Hello everybody,
got a problem with another one of my markups. This one having to do with commentingout text using the “< - -” characters.
As I may have explained already, I’ve been working with Ian lloyd’s book “Build your own web site the right way using html & CSS”. I’m on pages 38 - 39 the sections titled: “Using Comments to Hide Markup from Browsers Temporarily”. I copied the markup on page 38:
<!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>
but i get this on the page (in firefox):
Current Stock
The following items are available for order:
* Dark Smoke Window Tinting
* Bronze Window Tinting
* Spray mount Craft knife (pack of 5)
- - >
The last two lines should be hidden (also without bullets).
I put the mark up in the Validator and it tells me there are three errors. The problem seems to be with the <! - - - - > characters used to comment stuff out as shown in the book (see pp. 38 - 39). The validator tells me that:
- in line 16, column 7, the “<” character is the first character of a delimiter but occurs as data.
- line 16, column 7, character data is not allowed here - “here” being what? column 7?
- line 17, column 40, character data is not allowed here - the character being the fist dash of “- - >” the comment closer.
- line 16, column 7: start tag: invalid element name.
I’ve tried moving these characters to other columns and lines but to no avail - I checked everything several times but can’t find what’s wrong.
Can anybody shed some light on this?
Thank you for your attention,
cheers!