O'Reilly logo

Web Programming with HTML5, CSS, and JavaScript by Dean

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.5 Content Model Categories

What Content Is Allowed Within a Particular Container?

Despite the HTML validation service’s shortcomings mentioned in the previous section, it’s still a helpful tool, and you should use it. It’s good at identifying syntax errors, like misspelling tag names. It’s also good at containership rules. For example, the head container must contain a title element, and a p container must not contain a div container. With lots of elements (around 115), there are lots of containership rules (more than 11,000).1 Rather than having you remember each of those rules, it’s easier to assign elements to certain categories and have those categories be the basis for the containership rules. For a given web page, if an element ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required