Error Line 16, Column 23: Element style not allowed as child of
element body in this context. (Suppressing further errors from this
subtree.)
Because it sais “in this context” I’m hoping there is a way to embed CSS my HTML 5 using
<style TYPE="text/css">
</style>
and a different “context” whatever that means.
I have all my code in neat HTML 5 / CSS modules…and I prefer not to split up my CSS from my HTML though I think most people do it this way.
Is there a way I can keep embedded CSS w/ my HTML 5 and not break validation.
If not can I put the embedded CSS in the Head of the document?
Where can I put it?
The
styletag goes in theheadtag unless thescopedattribute is present, e.g.:However, the
scopedattribute is not implemented in any browser yet: