What is the categorization name for HTML elements when listed according to function, opposed to content model?

StackOverflow https://stackoverflow.com/questions/18818499

Question

The WHATWG, the W3C and Mozilla all categorize the HTML elements by content model, i.e.,:

  • Metadata content
  • Flow content
  • Sectioning content
  • Heading content
  • Phrasing content
  • Embedded content
  • Interactive content
  • Form-associated content
  • Transparent content model
  • Other content models

(See the W3C's HTML5 spec at 3.2.5 Content models)

But they also list HTML elements into another category, like so:

  • Root element
  • Document metadata
  • Scripting
  • Sections
  • Grouping content
  • Text-level semantics
  • Edits
  • Embedded content
  • Tabular data
  • Forms
  • Interactive elements

(See the HTML5 spec at 4. The elements of HTML)

Other sources of this grouping are seen in the WHATWG's specification, on the WHATWG Developers subdomain, and from Mozilla, so it's a popular labelling convention.

Is there a semantic name for the latter group, aside from the "HTML elements"? Maybe 'functional' or 'structural' list or something to differentiate from the box model list?

No correct solution

OTHER TIPS

The “category” concept is auxiliary and used to make various definitions shorter. For example, the content model of several elements is “flow content”, and though the category name is somewhat obscure, the concept still makes the definitions much shorter and more understandable than repeating a long list of elements.

The word “category” may be misleading, because an element may belong to more than one categories. However, the word “class”, though more descriptive, might have confused the concept with the concept associated with the class attribute.

There is no name except “category” for the concepts in the drafts cited. Outside the drafts, you can use, if needed, an expression like “category of elements as defined the HTML5 CR dated 6 August 2013” or some looser phrase like “category of elements in HTML5”.

Calling the categories “functional”, “structural”, or something else would mean taking a position on their “true nature”, and usually a wrong one. The categories are formed for different purposes and on different grounds. As said, even the word “category” may be misleading, and the drafts don’t actually use it in the heading for the clause that defines the “categories”. Note that the clause, 3.2.5.1 Kinds of content in HTML5 CR, says, after mentioning some categories: “Other categories are also used for specific purposes, e.g. form controls are specified using a number of categories to define common requirements. Some elements have unique requirements and do not fit into any particular category.”

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top