Skip Navigation

Comment Tags

Building Web Pages for Fun and Money

<!-- YaddaYaddaYadda -->

Comment tags start and end oddly, compared to other HTML tags.

Comments are Notes To Your Future Self…

<p>To hire a new Web designer:</p>

<ul>
    <li>Run ads in area newspapers</li>
    <li>Visit best candidates' Web sites</li>
    <li>Then, interview best candidates</li>
</ul>

<!-- Check with Ann to see if this is an un-ordered list or if it should be done in this order? -->

<p>Before we can formally offer…</p>

Comment tags tell Source viewers (only) whatever notes you would like to leave them. Your HTML Comments are available to, but not visible in, the browser. They are sent to every page visitor, but only visible if they View Source. They can span several lines.

Comment tags cannot be nested.

Comment tags are an excellent way to store design notes, ensure coworkers understand why you have done what you have done, store color codes. They are also a great way to hide markup you are unsure of.

Put a comment into your page, now. View the page in your browser. Do your comments appear?

Remember: Comment Tags Are Not Secure.