I'm getting this warning in the Visual Studio IDE. Is this true? Why is this the case, both are block elements in xhtml, no?
How can I determine which doctypes this error applies to? Does the above apply to both xhtml strict and transitional?
A heading is a block element but can only contain inline elements. There's no difference for strict or transitional. When you're unsure what an element can contain, these pages can help you out for Block elements and Inline elements.
If you need something to change the format inside a header (h1,h2,etc.), try a
<span>. Block elements aren't allowed.