diff --git a/images/content-venn.svg b/images/content-venn.svg index 80f41171f0b..e7f40370e6d 100644 --- a/images/content-venn.svg +++ b/images/content-venn.svg @@ -69,7 +69,7 @@
keygen
label
link
*main
main
*map
mark
math
kbd
label
link
(if it is allowed in the body)main
main
(if it is a hierarchically correct main
element)map
mark
math
HTMLBodyElement
.The body
element represents the main content of the document.
The body
element represents the contents of the document.
In conforming documents, there is only one body
element. The document.body
IDL attribute provides scripts with easy access to
@@ -15552,7 +15552,7 @@ interface HTMLBodyElement : HTMLElement {};
main
element descendants.main
element descendants.header
, footer
, or main
element descendants.header
or footer
element
+ descendants.header
, footer
, or main
element descendants.header
or footer
element
+ descendants.figcaption
element followed by flow content.figcaption
element.figcaption
element followed by flow content.figcaption
element.main
element.HTMLElement
.The main
element can be used as a container for the dominant contents of the
- document. It represents its children.
The main
element represents the dominant contents of the
+ document.
The main
element is distinct from the section
and
- article
elements in that the main
element does not contribute to the
- document outline.
A document must not have more than one main
element that does not have the hidden
attribute specified.
While there is no restriction as to the number of main
elements in a
- document, web developers are encouraged to stick to a single element.
A hierarchically correct main
element is one whose ancestor elements
+ are limited to html
, body
, div
, form
without
+ an accessible name, and autonomous custom elements. Each main
element must be a
+ hierarchically correct main
element.
In the following example, multiple main
elements are used and script is used to
+ make navigation work without a server roundtrip and to set the hidden
attribute on those that are not current:
+
+
<!doctype html> +<html lang=en-CA> +<meta charset=utf-8> +<title> … </title> +<link rel=stylesheet href=spa.css> +<script src=spa.js async></script> +<nav> + <a href=/>Home</a> + <a href=/about>About</a> + <a href=/contact>Contact</a> +</nav> +<main> + <h1>Home</h1> + … +</main> +<main hidden> + <h1>About</h1> + … +</main> +<main hidden> + <h1>Contact</h1> + … +</main> +<footer>Made with ❤️ by <a href=https://example.com/>Example 👻</a>.</footer>+
dl
element.dl
element: one or more dt
elements followed by one or more dd
elements, optionally intermixed with script-supporting elements.dl
element: Flow content.dl
element: flow content.main
HTMLElement
ins
;
kbd
;
label
;
- main
;
map
;
mark
;
MathML math
;
@@ -117398,6 +117431,7 @@ interface External {
area
(if it is a descendant of a map
element);
link
(if it is allowed in the body);
+ main
(if it is a hierarchically correct main
element);
meta
(if the itemprop
attribute is present)