Boolean attributes

If a boolean attribute is present, it is always true. Boolean attributes include autofocusinertcheckeddisabledrequiredreversedallowfullscreendefault, loopautoplaycontrolsmutedreadonlymultiple, and selected

Boolean values can either be omitted, set to an empty string, or be the name of the attribute; but the value doesn’t have to actually be set to the string true. All values, including truefalse, and , while invalid, will resolve to true.

These three tags are equivalent

<input required>
<input required="">
<input required="required">

By admin