问题描述
我想在H标签内使用自定义属性例如
I would like to use custom attribute inside H tagfor example
<h3 mydata="1">header</h3>
这种样式对SEO有用吗?
Is this style is good for SEO ?
谢谢
推荐答案
此属性将导致您的HTML停止验证,因为 mydata
不是HTML DOCTYPE的公认属性.
This attribute will cause your HTML to stop validating because mydata
is not a recognized attribute for the HTML DOCTYPE.
相反,使用 data-
属性存储数据.这些不会被搜索引擎解析,并且不会影响您页面的SEO值.
Instead, use data-
attributes to store data. These are not parsed by search engines and have no effect on the SEO value of your page.
有关更多信息,请参见: http://www.w3.org/TR/html5/elements.html#embedding-custom-non-visible-data-with-the-data-attributes
For more information, see: http://www.w3.org/TR/html5/elements.html#embedding-custom-non-visible-data-with-the-data-attributes
这篇关于具有自定义属性的SEO和H标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!