Using Comments to Hide Markup from Browsers Temporarily in HTML
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:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head> <title>Commenting out XHTML</title> <meta http-equiv="Content-Type"
content="text/html; charset=utf-8" /> </head> <body>
<h1>Current Stock</h1> <p>The following items are available for order:</p> <ul>
<li>Dark Smoke Window Tinting</li> <li>Bronze Window Tinting</li> <!-- <li>Spray mount</li> <li>Craft knife (pack of 5)</li> -->
</ul> </body></html>
Remember, you write a comment like this: <!--Your comment here followed by the comment closer, two dashes and a right-angled bracket-->.


LinkBack URL
About LinkBacks
Reply With Quote

LinkBacks Enabled by vBSEO
Bookmarks