W3C设置新的属性 [英] W3C setting new attributes
本文介绍了W3C设置新的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的jQuery滑块需要向img标签添加新的属性,以便它可以显示描述和链接。然而,这不符合W3C标准。
I am using a jQuery slider that requires I add new attributes to the img tag so it can display the description and a link. However this is not W3C compliant.
有没有办法让它通过?
<img src="..." alt="..." data-text-id="#sliderText" data-title="..." data-desc="..." />
谢谢。
推荐答案
将您的文档类型设置为HTML 5.在页面顶部使用此代码:
Set your doctype to be HTML 5. Use this code at the top of your page:
<!DOCTYPE html>
这篇关于W3C设置新的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文