微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

撇号是HTML元素属性值的有效容器吗?

通常HTML元素属性值用引号标记,如


但是,有时您会看到类似的代码


它是有效的HTML,它会导致任何问题吗?怎么样混合两者,比如


最佳答案
James Allardice对我原始问题的评论中的链接问题引出了我的答案:是的,撇号是HTML元素属性值的有效容器.

规格:On SGML and HTML

By default,SGML requires that all attribute values be delimited using either double quotation marks (ASCII decimal 34) or single quotation marks (ASCII decimal 39). Single quote marks can be included within the attribute value when the value is delimited by double quote marks,and vice versa.

原文地址:https://www.jb51.cc/html/425790.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐