Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 777
Emanuil Rusev Avatar asked May 31 '11 13:05

Emanuil Rusev


2 Answers

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")...

like image 107
lonesomeday Avatar answered Nov 11 '22 18:11

lonesomeday


The attributes checked and selected of the <input> tag belong to a group of attributes that don't accept a value.

Incorrect. They accept a value that is the same as the name of the attribute.

In HTML 4 you may omit everything except the value.

What's the term that refers to that group?

Boolean.

like image 4
Quentin Avatar answered Nov 11 '22 17:11

Quentin