Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Role of CSS :checked Selector
Use the CSS :checked selector to style every checked <input> element. You can try to run the following code to implement the :checked selector:
Example
<!DOCTYPE html>
<html>
<head>
<style>
input:checked {
height: 20px;
width: 20px;
}
</style>
</head>
<body>
<p>Fav sports:</p>
<form action="">
<input type = "checkbox" value = "Football">Football<br>
<input type = "checkbox" value = "Cricket">Cricket<br>
<input type = "checkbox" checked = "checked" value = "Tennis"> Tennis<br>
<input type = "checkbox" value = "Badminton">Tennis
</form>
</body>
</html>
Output

Advertisements