HTML5有效的项目范围 [英] HTML5 valid itemscope

查看:71
本文介绍了HTML5有效的项目范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用schema.org微格式标记我的内容,并且想知道itemscope属性.在 http://schema.org/docs/gs.html 上给出的示例是

I am marking up my content with schema.org microformats and am wondering about the itemscope attribute. The example given on http://schema.org/docs/gs.html is

<div itemscope itemtype="http://schema.org/Movie">

这是有效的HTML5吗?我认为属性需要值,例如

Is this valid HTML5? I thought attributes needed values, something like

<div itemscope="itemscope" itemtype="http://schema.org/Movie">

推荐答案

这是布尔属性,它是有效的HTML5.

It's a boolean attribute, which is valid HTML5.

如果存在该属性,则其值必须为空字符串或该属性的规范名称的ASCII大小写不匹配的值,并且没有前导或尾随空格.

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.

这篇关于HTML5有效的项目范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆