--- title: Input Checked Attribute --- ## Input Checked Attribute The checked attribute is a boolean attribute. When present, it specifies that an element should be pre-selected (checked) when the page loads. The checked attribute can be used with and . The checked attribute can also be set after the page load, through JavaScript. ## Take a look at the following example: ```html
I have a bike
I have a car
``` In the example above when the web page is loaded by default the second checkbox will come automatically selected due to the checked attribute.