Why isn’t this XHTML valid?
The HTML:
<h2>earthquake warning <span>Posted 03/11/2009 at 2.05pm</span></h2>
The CSS:
h2 {
font: bold 20px Arial, "Helvetica Neue", Helvetica, Geneva, sans-serif;
padding-bottom: 5px;
padding-top: 5px;
text-transform: uppercase;
}
h2 span {
font-weight: normal;
text-transform: none;
display: inline;
}
It’s more of putting
h2insidespan.Full Source:
You can’t put a h2 inside a span tag. Try using a
divinstead: