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 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2009
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error - document type does not allow element "li" here

    Hello,

    I am getting this error

    Line 110, Column 4: document type does not allow element "li" here

    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call 5.

    Line 111, Column 4: document type does not allow element "li" here

    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call 6

    And various in the same line.


    The Source code is as below


    <div id="Layer184">


    <ul class = "none">
    <div id="Layer186">
    <span class="style39"><strong>
    <span class="style133">

    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call1 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call2 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call3 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call4 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call5 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call6 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call7 </li>

    </span></strong></span>

    </div>
    </ul>


    <div class="style138" id="Layer187"><u>Call trades</u></div>
    <div id="Layer188"><a href="call-trades.html" class="style129 style35 style139"><strong>Call Account </strong></a></div>

    </div>

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    <span class="style133">

    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call1 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call2 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call3 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call4 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call5 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call6 </li>
    <li> <img src="tick.jpg" alt="" width="13" height="12"/>Call7 </li>

    </span>
    You made two mistakes. Nesting of a block level element like div,p,ul,li etc inside an inline element like span,a,strong etc is invalid. More over, you can't nest the list-item tag <li> inside an element other than <ol> or <ul> . See http://htmldog.com/reference/htmltags/li/
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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