Comments in HTML

When doing any form of coding it can be useful to make notes to yourself.  You can explain the code or remind yourself why you did things a certain way.  HTML may not need as much commenting as the other languages you are about to learn but you will need comments sometimes so start using them now.

Open forms.html and save it as comments.html.  Create a new blank line just above the form opening tag and paste this there:

<!-- This form accepts a user name and password for logging on -->

You should find that your editor gives it a colour to show that it is a comment.  Try the page and it will be unchanged.  Comments are for you not for the browser.  Browsers ignore all text inside comments.  HTML comments are the ugliest as they start <!-- and end --> but they are useful so use them.