Using CSS3, I can format a single paragraph <p>
validly. But when I need multiple paragraphs with different formatting, I rename my paragraphs to <p1>
and <p2>
. I can format them individually, but it does not pass the validity test. How can I do this in a manner where it will still be valid?
The way I am currently doing it gives me the following errors:
Element p1 not allowed as child of element body in this context.
Element p2 not allowed as child of element body in this context.
Don't change the element's tag name.
Add a
class
or anid
to the element in order to differentiate between them.jsFiddle example