My Site won't validate please HELP

Discussion in 'PHP' started by Romeo M, Aug 7, 2013.

  1. #1
    I am trying to validate my client site which I actually customized with wordpress BUT when I tried to validate it is not validating and showing error such as "Line 414, Column 9: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
    <ul>"


    " The mentioned element is not allowed to appear in the context in which
    you've placed it; the other mentioned elements are the only ones that
    are both allowed there and can contain the element mentioned.
    This might mean that you need a containing element, or possibly that
    you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a
    block-level element (such as "<p>" or "<table>") inside an
    inline element (such as "<a>", "<span>", or "<font>").
    "


    This is the coding that refers to the error(this is the actual footer.php):



    <!--footer-->
    <div class="clear"></div>


    <div id="footer">


    <div id="footer-info">
    <div style="float: left; width: 964px;">

    <div style="float: left; width: 238px;">
    <?php echo('Site Map'); ?><br /><br />
    <ul>
    <li><a href="http://brisbanebusinessaccountant.com.au/why-us/"> Why Us</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/about-us/"> About Us</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/team/">&nbsp;&nbsp;&raquo;&nbsp;Our Team</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/mission/">&nbsp;&nbsp;&raquo;&nbsp;Our Mission</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/testimonials/">&nbsp;&nbsp;&raquo;&nbsp;Testimonials</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/faq/">&nbsp;&nbsp;&raquo;&nbsp;FAQ</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/services/"> Services</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/tax/">&nbsp;&raquo;&nbsp;Tax</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/bas/">&nbsp;&raquo;&nbsp;Quarterly BAS</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/smsf/">&nbsp;&raquo;&nbsp;SMSF</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/financial-services/">&nbsp;&raquo;&nbsp;Financial Services</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/business-advice/">&nbsp;&raquo;&nbsp;Business Advise</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/cfo/">&nbsp;&raquo;&nbsp;Virtual CFO</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/bookkeeping/">&nbsp;&raquo;&nbsp;Bookkeeping</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/blog/"> Blog</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/resources/"> Resources</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/free-stuff/">&nbsp;&raquo;&nbsp;Free Stuff</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/links/">&nbsp;&raquo;&nbsp;Useful Link</a></li>
    <li><a href="http://brisbanebusinessaccountant.com.au/contact/"> Contact</a></li>
    </ul>
    </div>

    <div style="float: right; width: 200px;">

    <?php _e( 'Follow us: ', 'thememagic' ); ?><br /><br />
    <a href="#" ><img src="/wp-content/uploads/images/facebook.png" alt="" title="" height="40px" width="40px" /></a>
    <a href="#" ><img src="/wp-content/uploads/images/googleplus.png" alt="" title="" height="40px" width="40px" /></a>
    <a href="#" ><img src="/wp-content/uploads/images/twitter.png" alt="" title="" height="40px" width="40px" /></a><br /><br /><p>&nbsp;</p>
    <p>Address: <br />PO Box 1753, Capalaba QLD 4157</p>
    <p>Email : <br /></p>



    </div>

    <div style="width: auto;">
    <?php echo('Servicing Areas:'); ?><br /><br />
    <span style="color:#464646;">
    <ul>
    <li>&#8226;&nbsp;Capalaba</li>
    <li>&#8226;&nbsp;Birkdale</li>
    <li>&#8226;&nbsp;Cleveland</li>
    <li>&#8226;&nbsp;Alexandra Hills</li>
    <li>&#8226;&nbsp;Surrounding Areas of Redlands</li>
    <li>&#8226;&nbsp;Brisbane Metro Area</li>
    </ul></span>

    <br />
    <?php echo('Areas serviced also include, but are not limited to:'); ?><br /><br />
    <span style="color:#464646;">
    <ul>
    <li>&#8226;&nbsp;Wellington Point</li>
    <li>&#8226;&nbsp;Victoria Point</li>
    <li>&#8226;&nbsp;Thornlands</li>
    <li>&#8226;&nbsp;Ormiston</li>
    <li>&#8226;&nbsp;Wakerley</li>
    <li>&#8226;&nbsp;Carindale</li>
    <li>&#8226;&nbsp;Chandler</li>
    <li>&#8226;&nbsp;Mt Gravatt</li>
    <li>&#8226;&nbsp;Springwood</li>
    </ul></span>

    </div>

    </div>

    <br /><p>&nbsp;</p>
    <br /><p>&nbsp;</p>


    </div>

    </div>

    <?php wp_footer(); ?>

    </body>

    </html>


    Pleas HELP... Thanks in advance!









     
    Solved! View solution.
    Romeo M, Aug 7, 2013 IP
  2. marht

    marht Active Member

    Messages:
    142
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    58
    #2
    Hi Romeo M,

    You are using an ul in an inline object span. I would suggest to remove the span attribute and give the ul either an ID or a Class.

    Hope this helps you out,

    Kind regards,

    Maarten
     
    marht, Aug 7, 2013 IP
  3. #3
    Or switch to a DIV, though marht is quite right in that there's probably no legitimate reason to have that outer wrapping element in the first place.

    There are two major types of elements, inline-level and block-level -- and block level can't go inside inline-level ones. HTML 'level' and CSS 'display' are NOT the same thing, even if HTML 'levels' DEFAULT to their CSS equivalent, that's not what it means!

    If you lose track of which tags are which on that, I like this (older) HTML reference:
    http://htmlhelp.com/reference/html40/

    Since as you can see on UL's page:
    http://htmlhelp.com/reference/html40/lists/ul.html

    it says not only what it can contain (LI) but also what it can be contained in.

    Of course with the clearing DIV like it's still 2001, extra DIV quite possibly for nothing, non-breaking spaces for *** knows what (some of which look like they should be a nested list), presentational style inlined in the markup and what is quite obviously a inaccessible fixed width layout, you've got a lot of other issues in there.
     
    deathshadow, Aug 7, 2013 IP
  4. Romeo M

    Romeo M Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    so it is the span making the issue... if I replace span tag into div tag and just declare a css script for the colorization of text, would that be help???
     
    Romeo M, Aug 7, 2013 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    Yes, though since ALL you are doing with the span is setting the color, why not just set it on the UL? Don't waste extra DOM elements when you aren't doing anything useful with them that couldn't be applied directly to your semantic tags -- like that UL.
     
    deathshadow, Aug 7, 2013 IP
  6. Romeo M

    Romeo M Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #6
    Thanks guys, you really help me a lot. I change the span into div and everything is passed now when validating the site... Thanks you deathshadow and marht!!!!
     
    Romeo M, Aug 7, 2013 IP