开发者

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

开发者 https://www.devze.com 2023-03-09 05:53 出处:网络
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.

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 th开发者_运维问答e term that refers to that group of attributes?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消