...

View Full Version : html code not validating



Bobafart
02-24-2008, 05:26 PM
the W3C validator doesn't like the following code:




<UL>
<li/>Name
<li/>Address
<li/>Email address
<li/>(etc.)
</UL>



validator error is:




Line 88, Column 16: character data is not allowed here.
<li/>Name✉
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:

putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
forgetting to quote an attribute value (where characters such as "&#37;" and "/" are common, but cannot appear without surrounding quotes), or
using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.

CFMaBiSmAd
02-24-2008, 05:29 PM
The error message tells you what the problem is. Did you read the error message?

oesxyl
02-24-2008, 05:38 PM
remove '/' form '<li/>' because that means that li is empty and change to:



<UL>
<li>Name</li>
<li>Address</li>
<li>Email address</li>
<li>(etc.)</li>
</UL>


best regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum