boolean属性
boolean 属性指不需要声明取值的属性,XHTML 需要每个属性声明取值,但是 HTML5 并不需要;
更多内容可以参考 WhatWG section on boolean attributes:
boolean 属性的存在表示取值为
true,不存在则表示取值为false。
示例代码:
<input type="text" disabled>
<input type="checkbox" value="1" checked>
<select>
<option value="1" selected>1</option>
</select>