Emanuil Rusev Emanuil Rusev - 2 months ago 7
HTML Question

What's the term that refers to attributes that accept no value (i.e. "checked" and "selected")?

The attributes

checked
and
selected
, of the
<input>
and the
<option>
tags respectively, belong to a group of attributes that don't accept a value.

What's the term that refers to that group of attributes?

Answer

Boolean attributes:

Some attributes play the role of boolean variables (e.g., the selected attribute for the OPTION element). Their appearance in the start tag of an element implies that the value of the attribute is "true". Their absence implies a value of "false".

Boolean attributes may legally take a single value: the name of the attribute itself (e.g., selected="selected")...