I know this is more of an XHTML/CSS question, but does anyone know how to properly display code fragments in a post, nicely styled, and still have it validate?
For reference, check out this post.
For the one-line fragments, I used the
tag, nicely styled. This only works for a single line, it seems, and I don't want to have each line of a code block wrapped around it's own set of code tags.
For the blocks of code on that post, I used the <pre> tag. This displays perfectly, but doesn't validate. I get:
# Line 83, column 4: document type does not allow element "pre" here; missing one of "object", "ins", "del", "map", "button" start-tag
Does anyone have a solution? (I still don't understand why "pre" isn't allowed. I tried it with a p tag wrapped around it, without a p tag wrapped around it...No idea why the validator is looking for object, ins, del, map, or button...that makes no sense.)