For example:
<a /*title="need to be comment out"*/>a link</a>
In HTML, a comment is text enclosed within < ! ╌ ╌> tags. This syntax tells the browser that they are comments and should not be rendered on the front end. Thanks to the comments tag, you can leave notes to remind yourself where you left off in the build process.
The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers. You can use comments to explain your code, which can help you when you edit the source code at a later date. This is especially useful if you have a lot of code.
The W3C documentation suggests it cannot be done:
Note that comments are markup.
This basically means that a <!-- ...>
comment tag is just like any other tag, so <a <!--title="need to be comment out"-->>a link</a>
is as wrong as <a <span></span>>a link</a>
.
For quick hacking I believe a common option is to rename that attribute. While you obtain invalid HTML, you can temporarily remove the attribute:
<a xtitle="need to be comment out">a link</a>
If you happen to be using a server-side language, you can also use its own comment syntax. For instance, in PHP you can do this:
<a <?php/*title="need to be comment out"*/?>>a link</a>
... which generates this HTML:
<a >a link</a>
... and in ASP.NET you can use <%-- Comment goes here --%>
while the ASP.NET MVC Razor syntax is @* Comment goes here *@
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With