HTML Comments


Often comments in HTML code are used, which is why it is important to brown the browser to avoid showing it.

There are many reasons as we can add a comment inside an HTML script.

  • A note or reminder, a specification or explanation
  • Java script comments
  • An incomplete element
This comment will be placed between "<! -" and "->" tags, we will be able to leave a note to be remembered later that what the code was, or if there still need to be started is.

Example - 


<!--The beginning of the code that shows a photo-->

<p>This is a paragraph in between two lines of html comment</p>

<!--The end of the code that shows a photo-->

Output-

This is a paragraph in between two lines of html comment


Unfinished script

When you work on a script, but you leave it incomplete then the comments are very useful, it will be interpreted as a comment by the browser and placed in between two tags (<! - code ->) and shown will not go.

Example - 

<!-- <input type="text" size="12" /> -- Input Field -->

<input type="text" size="12" />

Output-



Share on Google Plus

About It E Research

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment