HTML Content Categories Flashcards

1
Q

Source of info for this deck

A

https: //developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories
https: //html.spec.whatwg.org/multipage/dom.html#kinds-of-content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe in your own words how the content categories relate and why they are separated

A

[[[Return to this once confident with the rest of the deck]]]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a content category and why do we use that framework?

A

Every element is a part of one or more content categories; a group of shared characteristics, behaviour and associated rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the main types of content categories and how are they different?

(3 types of categories)

A

Main content categories- describe common rules shared by many elements
Form related content categories- Describe rules common to form related elements
Specific content categories- describe rare categories shared only by a few elements, sometimes only in a specific context.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the 3 main categories of flow content?

What are the 7 main content categories and how are they different?

A

The three main subcategories of flow content are: heading, sectioning and phrasing content.

Metadata- sets up the presentation or behavior of the rest of the content, or that sets up the relationship of the document with other documents, or that conveys other “out of band” information.

Flow- broad category that encompasses most elements that can go inside the

element. It includes almost all the other main content categories (except some metadata)

Sectioning- Groups other elements into collections. Elements belonging to the sectioning content model create a section in the current outline that defines the scope of heading content and &lheader> and &lfooter> elements.

Heading- Defines the title of a section, whether marked by an explicit sectioning content element, or implicitly defined by the heading content itself.

Phrasing- This is mostly text and markup of text. Defines the text and the markup it contains. Runs of phrasing content make up paragraphs. If it can be inside a sentence, it’s most likely phrasing content

Embedded- Imports another resource or inserts content from another mark-up language or namespace into the document.

Interactive- Includes elements that are specifically designed for user interaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What makes form-related content? What are the 4 form-related content categories and how are they different?

A

Form-associated content is a subset of flow content comprising elements that have a form owner, exposed by a form attribute, and can be used everywhere flow content is expected. A form owner is either the containing

element or the element whose id is specified in the form attribute.

  • listed- Elements that are listed in the: form.elements and fieldset.elements IDL collections.
  • labelable- Elements that can be associated with elements.
  • submittable- Elements that can be used for constructing the form data set when the form is submitted.
  • resettable- Elements that can be affected when a form is reset.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the 3 Specific/Secondary/Other content categories and how are they different?

A

Palpable- Content is palpable when it’s neither empty or hidden.

Script supporting elements- Script-supporting elements are elements which don’t directly contribute to the rendered output of a document. Instead, they serve to support scripts, either by containing or specifying script code directly, or by specifying data that will be used by scripts.

Transparent content model- ???rules about what content and element can contain based on it’s parent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Does every element have a content category?

A

No

example: ???

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What describes metadata content?

A

Elements that modify the presentation or the behaviour of the rest of the document, set up links to other documents, or convey other out of band information

Elements belonging to this category are: &ltbase>, &ltcommand>, &ltlink>, (depricated) &ltmeta>, &ltnoscript>, &ltscript>, &ltstyle> and &lttitle>.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is out of band information?

A

Consider a networking application that tunnels data from a remote data source to a remote destination. The data being tunneled may consist of any bit patterns. The sending end of the tunnel may at times have conditions that it needs to notify the receiving end about. However, it cannot simply insert a message to the receiving end because that end will not be able to distinguish the message from data sent by the data source. By using an out-of-band mechanism, the sending end can send the message to the receiving end out of band. The receiving end will be notified in some fashion of the arrival of out-of-band data, and it can read the out of band data and know that this is a message intended for it from the sending end, independent of the data from the data source.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What describes flow content?

A

Content that effects what the user sees.
Broad category that encompasses most elements that can go inside the body element.
It also includes text nodes (but not those that only consist of white space characters).
The flow elements are: &lta>, &ltabbr>, &ltaddress>, &ltarticle>, &ltaside>, &ltaudio>, &ltb>,&ltbdo>, &ltbdi>, &ltblockquote>, &ltbr>, &ltbutton>, &ltcanvas>, &ltcite>, &ltcode>, (depricated)&ltcommand>, &ltdata>, &ltdatalist>, &ltdel>, &ltdetails>, &ltdfn>, &ltdiv>, &ltdl>, &ltem>, &ltembed>, &ltfieldset>, &ltfigure>, &ltfooter>, &ltform>, &lth1>, &lth2>, &lth3>, &lth4>, &lth5>, &lth6>, &ltheader>, &lthgroup>, &lthr>, &lti>, &ltiframe>, &ltimg>, &ltinput>, &ltins>, &ltkbd>, (depricated)&ltkeygen>, &ltlabel>, &ltmain>, &ltmap>, &ltmark>, &ltmath>, &ltmenu>, &ltmeter>, &ltnav>, &ltnoscript>, &ltobject>, &ltol>, &ltoutput>, &ltp>, &ltpicture>, &ltpre>, &ltprogress>, &ltq>, &ltruby>, &lts>, &ltsamp>, &ltscript>, &ltsection>, &ltselect>, &ltsmall>, &ltspan>, &ltstrong>, &ltsub>, &ltsup>, &ltsvg>, &lttable>, &lttemplate>, &lttextarea>, &lttime>, &ltu>, &ltul>, &ltvar>, &ltvideo>, and &ltwbr>.

A few other elements belong to this category, but only if a specific condition is fulfilled:

&ltarea>, if it is a descendant of a &ltmap> element
&ltlink>, if the itemprop attribute is present
&ltmeta>, if the itemprop attribute is present
&ltstyle>, if the (depricated) scoped attribute is present

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What describes phrasing content?

A

This is mostly text and markup of text.
Phrasing content is a subset of flow content that defines the text and the markup it contains, and can be used everywhere flow content is expected. Runs of phrasing content make up paragraphs. If it can be inside a sentence, it’s most likely phrasing content
Elements belonging to this category are &ltabbr>, &ltaudio>, &ltb>, &ltbdo>, &ltbr>, &ltbutton>, &ltcanvas>, &ltcite>, &ltcode>, &ltcommand>, &ltdata>, &ltdatalist>, &ltdfn>, &ltem>, &ltembed>, &lti>, &ltiframe>, &ltimg>, &ltinput>, &ltkbd>, &ltkeygen>, &ltlabel>, &ltmark>, &ltmath>, &ltmeter>, &ltnoscript>, &ltobject>, &ltoutput>, &ltpicture>, &ltprogress>, &ltq>, &ltruby>, &ltsamp>, &ltscript>, &ltselect>, &ltsmall>, &ltspan>, &ltstrong>, &ltsub>, &ltsup>, &ltsvg>, &lttextarea>, &lttime>, &ltu>, &ltvar>, &ltvideo>, &ltwbr> and plain text (not only consisting of white spaces characters).

A few other elements belong to this category, but only if a specific condition is fulfilled:

&lta>, if it contains only phrasing content
&ltarea>, if it is a descendant of a &ltmap> element
&ltdel>, if it contains only phrasing content
&ltins>, if it contains only phrasing content
&ltlink>, if the itemprop attribute is present
&ltmap>, if it contains only phrasing content
&ltmeta>, if the itemprop attribute is present

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What describes embedded content?

A

Imports another resource or inserts content from another mark-up language or namespace into the document, and can be used everywhere flow content is expected.

Elements that belong to this category include: &ltaudio>, &ltcanvas>, &ltembed>, &ltiframe>, &ltimg>, &ltmath>, &ltobject>, &ltpicture>, &ltsvg>, &ltvideo>.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What describes heading content?

A

Defines the title of a section, whether marked by an explicit sectioning content element, or implicitly defined by the heading content itself. Heading content can be used everywhere flow content is expected.
&lth1> &lth2> &lth3>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What describes sectioning content?

A

Group other elements into collections
Can be used everywhere flow content is expected. Elements belonging to the sectioning content model create a section in the current outline that defines the scope of &lheader> elements, &lfooter> elements, and heading content.
Ex (these may be all the possible sectioning elements): &ltarticle>, &ltaside>, &ltnav>, and &ltsection>.

(Do not confuse this content model with the sectioning root category, which isolates its content from the regular outline.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What describes interactive content?

A

Includes elements that are specifically designed for user interaction, and can be used everywhere flow content is expected.
Elements that belong to this category include: &lta>, &ltbutton>, &ltdetails>, &ltembed>, &ltiframe>, &ltkeygen>, &ltlabel>, &ltselect>, and &lttextarea>

Some elements belong to this category only under specific conditions:

&ltaudio>, if the controls attribute is present
&ltimg>, if the usemap attribute is present
&ltinput>, if the type attribute is not in the hidden state
&ltmenu>, if the type attribute is in the toolbar state
&ltobject>, if the usemap attribute is present
&ltvideo>, if the controls attribute is present

17
Q

What describes form content?

A

Form-associated content is a subset of flow content comprising elements that have a form owner, exposed by a form attribute, and can be used everywhere flow content is expected. A form owner is either the containing &ltform> element or the element whose id is specified in the form attribute.

&ltbutton>
&ltfieldset>
&ltinput>
(depricated) &ltkeygen>
&ltlabel>
&ltmeter>
&ltobject>
&ltoutput>
&ltprogress>
&ltselect>
&lttextarea>

18
Q

What describes form- listable content?

A

Elements that are listed in the form.elements and fieldset.elements IDL collections.
Contains &ltbutton>, &ltfieldset>, &ltinput>, (depricated) &ltkeygen>, &ltobject>, &ltoutput>, &ltselect>, and &lttextarea>.

19
Q

What describes form- labelable content?

A

Elements that can be associated with &ltlabel> elements.
Contains &ltbutton>, &ltinput>, (depricated)&ltkeygen>, &ltmeter>, &ltoutput>, &ltprogress>, &ltselect>, and &lttextarea>.

20
Q

What describes form- submittable content?

A

Elements that can be used for constructing the form data set when the form is submitted.
Contains &ltbutton>, &ltinput>, (depricated)&ltkeygen>, &ltobject>, &ltselect>, and &lttextarea>.

21
Q

What describes form- resettable content?

A

Elements that can be affected when a form is reset.
Contains &ltinput>, (depricated)&ltkeygen>, &ltoutput>,&ltselect>, and &lttextarea>.

22
Q

What is a content model?

A

The contents of an element are its children in the DOM tree.

Each element has a content model: a description of the element’s expected contents.

HTML Authors must not use HTML elements anywhere except where they are explicitly allowed, as defined for each element, or as explicitly required by other specifications (such as ATOM)
Ex:

23
Q

What is Transparent content model? (Still ???)

A

(Still ???)
If an element allows flow content, then it’s children may also allow for flow content
If an element allows only phrasing content, then it’s children are also restricted to only phrasing content

For instance, an ins element inside a ruby element cannot contain an rt element, because the part of the ruby element’s content model that allows ins elements is the part that allows phrasing content, and the rt element is not phrasing content.

(more detailed explanation)
If the content model of a particular element foo is described as transparent, it means:

when element foo is a child of a parent element bar whose content model is allowed to contain flow elements, then the contents of element foo may also contain flow elements
when element foo is a child of a parent element baz whose content model restricts its child elements to only being phrasing elements, then any child elements of element foo are also restricted to only being phrasing elements.

Consider the following markup fragment:

&ltp>&ltobject>&ltparam>&ltins>&ltmap>&lta href=”/”>Apples&lt/a>&lt/map>&lt/ins>&lt/object>&lt/p>
To check whether “Apples” is allowed inside the a element, the content models are examined. The a element’s content model is transparent, as is the map element’s, as is the ins element’s, as is the part of the object element’s in which the ins element is found. The object element is found in the p element, whose content model is phrasing content. Thus, “Apples” is allowed, as text is phrasing content.

When a transparent element has no parent, then the part of its content model that is “transparent” must instead be treated as accepting any flow content.

24
Q

What describes script supporting content?

A

Script-supporting elements are elements which don’t directly contribute to the rendered output of a document. Instead, they serve to support scripts, either by containing or specifying script code directly, or by specifying data that will be used by scripts.

The script-supporting elements are:

&ltscript>
&lttemplate>

25
Q

What describes palpable content?

(still ??)

A

(still ??) Content is palpable when it’s neither empty or hidden; it is content that is rendered and is substantive. Elements whose model is flow content should have at least one node which is palpable.

26
Q
A