html – 涉及不接受任何值的属性(即“已选”和“已选”)的术语是什么?

前端之家收集整理的这篇文章主要介绍了html – 涉及不接受任何值的属性(即“已选”和“已选”)的术语是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
检查并选择了< input>而< option>标签分别属于不接受值的一组属性.

什么是指这组属性的术语?

解决方法

Boolean attributes

Some attributes play the role of boolean variables (e.g.,the 07001 attribute for the 07002 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")…

原文链接:/html/230617.html

猜你在找的HTML相关文章