Quackit Logo
Sponsored Links
$1.99 Domain Names
With every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99.
Create free Flash websites

HTML Comments

Print Version

Before we go any further, I'd like to introduce the concept of comments. Although comments are optional, they can assist you greatly.

Comments are a part of the HTML code and is used to explain the code. This can be helpful for other HTML coders when trying to interpret someone elses code. It can also be useful for yourself if you have to revisit your code in many months, or even years time. Comments aren't displayed in the browser - they are simply there for the programmer's benefit.

You write comments like this:

<!-- Write your comment here -->

Comments always start with <!-- and end with -->. This tells the browser when a comment begins and ends.

Example HTML Code:

<-- Display a happy image --->
<img src="http://www.quackit.com/pix/smile.gif"
	width="100" height="100" alt="Smile" />

This results in:

Smile

As you can see, the comment is invisible to the user viewing the page in the browser. It is there, simply for the HTML coder's benefit.

Well, we have now finished the first part of this tutorial. We have covered a lot, and by now, you have learned enough to build a website.

If you'd like to learn some of the more advanced HTML techniques, such as, how to create tables, frames, forms etc, please continue!

Enjoy this website?

  1. Add this page to your Favorites
  2. Link to this page (copy/paste into your own website or blog):
  3. Help support Quackit by making a donation
  4. Add this page to your favorite social bookmarks sites:      

Oh, and thank you for supporting Quackit!

Need Website Content?
Get unique, quality digital content for your website.
  • 270+ Website Templates
  • 800+ Flash Templates
  • 25,000+ Images, Logos
  • 30,000+ e-Books
  • 15,000+ Scripts
  • 27,000+ Animated GIFs
  • 21,000+ Ringtones
  • ...and much more!
Get your content now!
FREE Hosting!
With every domain you register with ZappyHost you get FREE hosting.
© Copyright 2000 - 2010 Quackit.com