👋 Hello! I'm Alphonsio the robot. Ask me a question, I'll try to answer.
What is the syntax of an HTML checkbox?
The syntax of an HTML checkbox is usually the checkbox (<input>
) associated with a clickable label <label>
:
<input type="checkbox" id="johndoe" name="john" value="1">
<label for="johndoe"> John Doe</label><br>
The above code displays the following checkbox: