Markup validation errors – many of them -__-
-
I just got my site going with a fresh WP install, along with a theme that I built from the ground up. However I’m getting many Markup errors, like no DOCTYPE found, which I did declare it.
Here’s the Validation link
http://validator.w3.org/check?uri=dmallous.com&charset=%28detect+automatically%29&doctype=Inline&group=0Here’s my site
http://dmallous.comI’m guessing something is screwed bad in the header/index files.
-
When I view the source for your home page, I see this at the top:
<div id="wrap" class="container_12"> <!DOCTYPE html>The DOCTYPE must be the first line sent to the browser. Clearing that up will probably affect many of the other errors.
Ahhhh, got it. I moved that off my index.php and into the beginning of the body of my header.php, cleared that up. However now I have around 140 errors, but they all seem to be coming from the content (posts).
I’m down to 21 errors, however I’m not too sure how to fix this one:
Line 89, Column 25: Element style not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
<style type=’text/css’>
Contexts in which element style may be used:
If the scoped attribute is absent: where metadata content is expected.
If the scoped attribute is absent: in a noscript element that is a child of a head element.
If the scoped attribute is present: where flow content is expected, but before any other flow content other than inter-element whitespace, and not as the child of an element whose content model is transparent.
Content model for element div:
Flow content.It’s something to do with the galleries on the posts.
Something is inserting a style sheet in an improper location. If it is a plugin, then you might need to find an alternative one. If it is a part of your theme, you could make a child theme and correct it there by rewriting the bad code.
Yeah it looks like the gallery stuff that’s integrated into WordPress.
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
I just got rid of that crappy gallery and just used xhtml/css. Valid now.
You do know that you can suppress the default gallery’s CSS output, don’t you?
Umm, no. How?
Just add something like:
function remove_gallery_css() { add_filter( 'use_default_gallery_style', '__return_false' ); } add_action( 'after_setup_theme', 'remove_gallery_css' );to functions.php.
Put that in my functions.php, it removed the style, but it still causes invalid markup
Error Line 79, Column 13: Element dl is missing a required instance of child element dd.
</dt></dl><dl class=’gallery-item’>
Content model for element dl:
Zero or more groups each consisting of one or more dt elements followed by one or more dd elements.Error Line 82, Column 13: Element dl is missing a required instance of child element dd.
</dt></dl><dl class=’gallery-item’>
Content model for element dl:
Zero or more groups each consisting of one or more dt elements followed by one or more dd elements.Error Line 85, Column 13: Element dl is missing a required instance of child element dd.
</dt></dl><br style=”clear: both” />
Content model for element dl:
Zero or more groups each consisting of one or more dt elements followed by one or more dd elements.Error Line 88, Column 567: No p element in scope but a p end tag seen.
…ice, and hopefully will go to a good owner (who can give it some upgrades).</p>
Hmm… I’m not seeing these errors using the default gallery markup in my themes.
Have you found a solution, I’m also experiencing the same issue:
Line 104, Column 25: Element style not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
<style type=’text/css’>
Contexts in which element style may be used:
If the scoped attribute is absent: where metadata content is expected.
If the scoped attribute is absent: in a noscript element that is a child of a head element.
If the scoped attribute is present: where flow content is expected, but before any other flow content other than inter-element whitespace, and not as the child of an element whose content model is transparent.
Content model for element div:
Flow content.
Line 125, Column 13: Element dl is missing a required instance of child element dd.
</dt></dl><dl class=’gallery-item’>
Content model for element dl:
Zero or more groups each consisting of one or more dt elements followed by one or more dd elements.
Line 128, Column 13: Element dl is missing a required instance of child element dd.
</dt></dl><dl class=’gallery-item’>
Content model for element dl:
Zero or more groups each consisting of one or more dt elements followed by one or more dd elements.
Line 131, Column 13: Element dl is missing a required instance of child element dd.
</dt></dl><dl class=’gallery-item’>
Content model for element dl:
Zero or more groups each consisting of one or more dt elements followed by one or more dd elements.
Line 134, Column 13: Element dl is missing a required instance of child element dd.
</dt></dl><br style=”clear: both” /><dl class=’gallery-item’>
Content model for element dl:
Zero or more groups each consisting of one or more dt elements followed by one or more dd elements.
Line 137, Column 13: Element dl is missing a required instance of child element dd.
The topic ‘Markup validation errors – many of them -__-’ is closed to new replies.