प्रत्येक चेक किए गए <इनपुट> तत्व को स्टाइल करने के लिए CSS :checked चयनकर्ता का उपयोग करें। आप :चेक किए गए चयनकर्ता को लागू करने के लिए निम्न कोड चलाने का प्रयास कर सकते हैं:
उदाहरण
<!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> आउटपुट
