HTML中布尔型属性的赋值问题

在HTML Standard里面有这么一句话

If the attribute is present, its value must either be the empty string or a value that is an ASCII case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace.

这句话的后半句是什么意思? 除了给这个属性设置空值,还有一个是什么值?

阅读 4.7k
2 个回答
i.e. either disabled or disabled="disabled"

开头和结尾都没有空格不区分大小写符合属性名称规范的ASCII值

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题