What is HTML checked Attribute?

HTML, HTML Attributes , 0 Comments

The 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.


    <input type="checkbox" name="check" value="1" checked> 
  		Checked by default
    <input type="checkbox" name="check" value="2"> 
  		Not checked by default 

Browser Support

checked 1.0 2.0 1.0 1.0 1.0

Leave a Reply

Your email address will not be published.