...

View Full Version : w3c validation (document type does not allow element "li" here)



parry281
07-21-2011, 03:35 PM
Hi Guys,

can anyone help as its doing my head in lol!

here is the code and this is what errors im getting

[CODE]
<br />
<div style="text-align:left;">
<strong><li>Get the most out of your office communications.</li></strong>
<a href="http://www.bradyeurope.com/"><img src="/Higssolutions/images/common/brady.jpg" alt="Brady" width="150" height="49" longdesc="http://spdesignsolutions.co.uk/Higssolutions/images/common/brady.jpg" style="float:right;"/></a></div><br />
<div style="text-align:left;">
<strong><li>Ensure your network supports latest high speed data requirements.</li></strong>
<br />
<strong><li>Enable fast resolution of any future communications problems.</li></strong></div>
<br />
[ICODE]

and these are the errors im getting.

Line 124, Column 26: document type does not allow element "li" here
<strong><li>Get the most out of your office communications.</li><

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

Line 127, Column 25: document type does not allow element "li" here
<strong><li>Ensure your network supports latest high speed data re

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

Line 129, Column 26: document type does not allow element "li" here
<strong><li>Enable fast resolution of any future communications p

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

if anyone could help that would be great.

tracknut
07-21-2011, 03:57 PM
Here's the description of using the <li> tag - http://www.w3schools.com/tags/tag_li.asp

You're missing the <ol> or <ul> tags to create the list.

Dave

parry281
07-21-2011, 04:05 PM
Hi thanks mate,

do you know if they would be set before or after the "div style"?

thanks

scott

tracknut
07-21-2011, 04:14 PM
It's not clear why you need that div, but if it's needed, something like:


<div style="text-align:left;">
<ol>
<li><strong>Get the most out of your office communications.</strong></li>
<li><a href="http://www.bradyeurope.com/"><img src="/Higssolutions/images/common/brady.jpg" alt="Brady" width="150" height="49" longdesc="http://spdesignsolutions.co.uk/Higssolutions/images/common/brady.jpg" style="float:right;"/>
<strong>Ensure your network supports latest high speed data requirements.</strong></li>
<li><strong>Enable fast resolution of any future communications problems.</strong></li>
</ol></div>


Dave



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum