Where can I find a list of proper HTML nesting standards?

旧时模样 提交于 2019-11-29 18:52:19

Try the language definition

(hint: there are indexen of elements and attributes if you scroll down to the bottom)

EDIT: there's also the latest draft of HTML5

unor

In HTML5, each element has

The content model describes (with the help of categories) the expected contents of an element (e.g., which elements are allowed as children). See Elements → Content models for a list of the categories.

Example: The p element is defined as:

Categories:

  • Flow content.
  • Palpable content.

Content model:

  • Phrasing content.

So p can contain any element that belongs to the "phrasing content" category (a, abbr, …).

And p can be child of any element whose content model expects "flow content" and/or "palpable content". (For convenience, "contexts in which this element can be used" describes those elements (but it’s non-normative).)


Note that other specifications may modify the definitions. For example, RDFa and Microdata extend HTML5 to allow meta/link in the body.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!