How to comment HTML tag attribute in HTML source code?

前端 未结 4 1363
粉色の甜心
粉色の甜心 2020-12-11 14:57

For example:

a link
4条回答
  •  情书的邮戳
    2020-12-11 15:07

    I usually just put _x at the end of the attribute name. Then the attribute is ignored because it's unknown. So if I wanted to comment out the id attribute from this element:

    
    

    I would change it to this:

    
    

    This also has the advantage of being able to search for "_x=" to find all commented attributes.

提交回复
热议问题