Home‎ > ‎ICT Programming‎ > ‎Assignments Fall 2012‎ > ‎

HTML - Comments

posted Oct 4, 2012, 8:19 AM by Jon Hamlin   [ updated Sep 15, 2013, 8:20 PM ]
Comments can be a nice way to help yourself when you are coding your Web page. Comments are invisible to a Web browser when it displays your Web page. The only way to view comments is to look at the source (HTML) code of the Web page. In this way, you can leave yourself notes so that you don't forget something when you come back later to redesign the page.

Comments always look like this:

<!--This is a comment. Comments are not displayed in the browser-->

Here is an example of how a comment can help remind future designers why things should look a certain way:

<!-- This image should be aligned to the right, and have alt text -->
<img src="mypet.gif" align="right" alt="Look at my Kitty Cat!" />