|
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. So, how is it done? To write a comment, you begin with a less than
sign (<) followed directly by an exclaimation point (!) and two dashes
(--). After this, you type in your coments. To end the comment, you use two
dashes (--) followed directly by a greater than sign (>).
<!-- I am a comment. I feel invisible though. -->
You can comment on multiple lines, just be sure you remember to end the
comment!
<!--
You can't see me....
unless you look at the page source code.
-->
To look at something more useful, you could use a comment to remind yourself
that a section of code is supposed to perform a certain task:
<!-- This image should be aligned to the right, and have
alt text -->
< IMG SRC="mypet.gif" align="right" alt="Look at my Kitty Cat!">
Of course, you do not need to have a kitty cat to qualify!
|