Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在两个双引号之间插入 html 注释:
<img src="<!--comment-->Image.jpg"/>
这是行不通的。
W3C 文档建议不能这样做:
这基本上意味着<!-- ...>评论标签就像任何其他标签一样,所以<a <!--title="need to be comment out"-->>a link</a>和<a <span></span>>a link</a>.
<!-- ...>
<a <!--title="need to be comment out"-->>a link</a>
<a <span></span>>a link</a>
来源:如何在 HTML 源代码中注释 HTML 标签属性?