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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post

    html code not validating

    the W3C validator doesn't like the following code:


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

    validator error is:

    Code:
    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.
    Last edited by Bobafart; 02-24-2008 at 04:30 PM.

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,026
    Thanks
    2
    Thanked 314 Times in 306 Posts
    The error message tells you what the problem is. Did you read the error message?
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    remove '/' form '<li/>' because that means that li is empty and change to:

    Code:
    <UL>
    <li>Name</li>
    <li>Address</li>
    <li>Email address</li>
    <li>(etc.)</li>
    </UL>
    best regards

  • Users who have thanked oesxyl for this post:

    Bobafart (02-24-2008)


  •  

    Posting Permissions

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