具有自定义属性的SEO和H标签 [英] SEO and H tag with custom attribute

查看:62
本文介绍了具有自定义属性的SEO和H标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在H标签内使用自定义属性例如

I would like to use custom attribute inside H tag for 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标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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