I wrote all my templates as HTML Transitional because most templates were written in it and that’s how I’ve been learning, ripping stuff apart, writing it again, etc. I’m now trying to write it as XHTML Strict (and I guess HTML 5 once browsers start supporting it!). This code:
“<link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
<meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>”/>”
Will not validate as HTML strict, the validator gives an error of:
“Line 10 column 127: character data is not allowed here.
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 “%” and “/” are common, but cannot appear without surrounding quotes).
Line 16 column 50: character data is not allowed here.
<meta name=”generator” content=”WordPress 2.1.2″ /> <!– leave this for stats –>”
I’ve looked at a few pages, tried to figure out what it hates but no clue. I think it’s to do with WordPress PHP tags outputting text and trying to finish them with ‘/>’ but I don’t know a way around this. I guess it’s modifying the WP output? But that’s not the case for the ‘…style.css” />’.
Am I missing the point? Any help would appreciated as I’m stumped!
- The topic ‘HTML Strict Validation Problems: WP Output the problem?’ is closed to new replies.