Skip to content Skip to sidebar Skip to footer

Html5: Reference For Valid Tags Inside Other Tags

A while back I was using the w3c validator for HTML5 and I was experimenting with a tag to replace the deprecated tag. I typed this little example:

Solution 1:

With HTML5 the old categories of block and inline have been extended and replaced by a new content model. The distinction between block and inline is now something which only really matters in CSS.

If you look at any particular element in the spec you'll see that it has a list of content categories it belongs to, the category in which the element can be used and the allowed content model of its descendants.

The p element has a content model of phrasing content, therefore it cannot contain a pre element because that can be used only where flow content is expected.

Post a Comment for "Html5: Reference For Valid Tags Inside Other Tags"