HTML Comment Tags

HTML comment tags are very handy tags which helps network of developer to understand the code or put any note for reference to other user.

You can add comments to your HTML source by using the following syntax:

<!-- This is my HTML Comment which is only visible in source code. -->
 
Note: Comments are not displayed by the browser, but they can help document your HTML source code.
Comments are  great for debugging HTML, because you can comment out HTML lines of code, one at a time, to search for errors:
 
<!-- Do not display this at the moment
<img border="0" src="my_logo.png" alt="w3clan logo">
-->

Conditional Comments

You might stumble upon conditional comments in HTML:

<!--[if IE 8]>
    .... Do your magical call if internet explorer version is 8 ....
<![endif]-->

 Comments are life saviour many times .


Loading ...

Related Results :

  1. HTML Comment Tags
Note :
  • Related Posts are generally User Blog posts.
  • or Other tutorials from other networks of w3clan.com.
  • Any registered user can create related posts based on search term tags.

About the Author