Home Logo
Show Full Menu
Hide Full Menu

HTML Comments

Created: 27/09/10 Views: 1405 myFave Image

In this tutorial we will quickly learn how to include comments into our HTML document
Comments may seem pretty pointless when you start coding, however after you code more often and you write much longer script you will get to the point when you come back to the code and not have a clue what is what, or what div ends where etc etc, so it is a great idea to write comments whilst you code or comment after each closing tag, especially the closing div tags

The comments themselves are not visible on the browser, but are still visible in browser code readers so in sense of being 'professional', I would recommend to stay away from short hand writing.

Here is how we write a comment in HTML
  • <!-- Comment goes between these -->

Pretty simple right? That is pretty much there is all to it, but knowing how to write a HTML comment will become very handy, trust me!

next tutorial: Special Characters

There are no comments