What is HTML checked Attribute?
HTML, HTML Attributes 0 CommentsThe checked
attribute is a boolean attribute and it specifies that an element should be pre-selected (checked) when the page loads.
Tip: you can also set checked attribute after page load with using JavaScript.
Tag Support
You can use checked attribute with <input>
tag where input type is checkbox
or radio
.
Example
<form> <input type="checkbox" name="check" value="1" checked> Checked by default <br> <input type="checkbox" name="check" value="2"> Not checked by default </form>
Browser Support
Attribute | |||||
---|---|---|---|---|---|
checked | 1.0 | 2.0 | 1.0 | 1.0 | 1.0 |
Leave a Reply