撇号是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.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 <div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些