Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    w3c validation (document type does not allow element "li" here)

    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.

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,224
    Thanks
    10
    Thanked 269 Times in 268 Posts
    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

  • #3
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi thanks mate,

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

    thanks

    scott

  • #4
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,224
    Thanks
    10
    Thanked 269 Times in 268 Posts
    It's not clear why you need that div, but if it's needed, something like:
    Code:
    <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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •