Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/24/2008
Times viewed :
1648
The <!-- … -->Tag (XHTML Reference)
Introduction
In XHTML you have the possibility to use comments. The web
browser ignores comments. That means that the comments aren’t shown to the user
if the page is shown in any Internet browser. Comments are very important if
you write code, even if it is a simple HTML page. Sometimes comments can save
you many hours. For example you can write down the author of the code or the
creation date of the file.
Examples
A comment looks like this:
<!-- … -->
Everything between those tags is not displayed to the end
user. The above example only comments one line. To comment multiple lines you
can do the following:
<!-- Your comment can be here and here and as well as here -->
Here is a more practical example:
<!-- Author: Sonu Kapoor Date: 08/02/004
Comment:
Created core tags
Author: Mark Wilson
Date: 08/01/04
Comment:
Cleaned up some tags
-->
…
You can even comment html tags if you want. This can be
useful if you are trying different tags and would like to see only one at a
given time. The following example will make the usage clear.
<h1>SKapoor Enterprise</h1>
<!-- <h2>SKapoor Enterprise</h2>-->
<!-- <h3>SKapoor Enterprise</h3>-->
<!-- <h4>SKapoor Enterprise</h4>-->
<!-- <h5>SKapoor Enterprise</h5>-->
As you can see I am not really sure which font size the
company name should have. Therefore I have included several sizes to see the
difference, but only the first one will be visible in the browser. I could view
each one by one and comment out the others, so that I can choose the best size
for my layout.