I ran our homepage through the W3C code validator today, and it threw up the following error:
Line 108, Column 63: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag.
…class="links"> <ul class="links inline"><li class="first last forward_links"><a
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>").
Like it says, "the mentioned element" - <ul> - is a block level element and it's inside the inline element <span>. I reckon changing <span> to <div> would give me a green light on this page. Can you please advise where the code resides then I can change it and see what happens?
Thanks!
Comments
Comment #1
seanrI think that's your site's theme, not my module. Check your node.tpl.php. Also, a URL would be helpful.
Comment #2
Watchkeeper commentedThanks for the reply. The full line is:
<span class="links"> <ul class="links inline"><li class="first last forward_links"><a href="/forward/1" title="Forward this page to a friend" class="forward-page forward_links">Email this page</a></li></ul> </span>and the page is at http://5loaves2fishes.net
I looked in the node.tpl.php file and the
<span>tag is present so I changed it to<div>and everything is now OK - the page passes verification and I've added the W3C Validation button to the page footer.Thanks for the help, and thanks also for the module. It's a great asset on our site.
Comment #3
seanrGlad you were able to fix it.