the web workshop


Placing comments in a web page helps you keep organized. A webpage can get huge very fast. Comments help mark areas of a web page.

<!-- this is a comment -->

The browser window will not display the content inside of <!-- and -->

Using Comments to Hide Markup from Browsers Temporarily

There is no limit to the amount of information you can put into a comment, and
this is why comments are often used to hide a section of a web page temporarily.
Commenting may be preferable to deleting content, particularly if you want to
put that information back into the web page at a later date (if it’s in a comment,
you won’t have to re-type it).

This is often called “commenting out” markup.
Here’s an example: File: commentout.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="">
   <title>Commenting out XHTML</title>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <h1>Current Stock</h1>
   <p>The following items are available for order:</p>
      <li>Dark Smoke Window Tinting</li>
      <li>Bronze Window Tinting</li>
 <!-- <li>Spray mount</li>
      <li>Craft knife (pack of 5)</li> -->

Figure 2.11 shows how the page displays in Firefox
comment .
Notice: The final commented list items are not displayed

This workshop is brought to you by

Please feel free to contact us with any comments and/or concerns about this workshop