Quackit Logo

FREE Hosting!

With every domain name you register with ZappyHost, you get FREE hosting.

$1.99 Domain Names

With every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99.

HTML Comments Tag

Print Version

The information on this page is based on HTML version 4.01 (which is the current version of HTML). The next version, HTML 5, is currently being written. Here's a list of HTML 5 tags.

The HTML 'comments' tag is used for creating comments within your HTML code.

Comments aren't displayed in the browser - they are simply there for the programmer's benefit. Comments can assist you, the HTML programmer, because you can write notes to yourself that explain what the code does. This is especially useful when you have a lot of code.

HTML comments are often used in conjunction with JavaScript. Programmers surround their JavaScript code with HTML comments. The HTML comments tell browsers that don't support JavaScript (or with JavaScript disabled) to ignore the code in between. This prevents the code from being displayed to your users.

You can see an example here.

Example <!-- Here is a comment. The browser will not display this text. -->
Attributes: None.
Try it yourself!


Also see the HTML 5 version of HTML tags

Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
               
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!