diff --git a/source b/source index 61f30552fe3..35986b02358 100644 --- a/source +++ b/source @@ -13194,6 +13194,8 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%
draggable
enterkeyhint
hidden
headingoffset
headingreset
inert
inputmode
is
h1
–h6
elements have a heading level, which is given
- by the number in the element's name.
h1
–h6
elements have a heading level, which is
+ given by getting the element's computed
+ heading level.
These elements represent headings. The lower a HTMLHeadingElement : HTMLElement {
+ The The To get an element's comptued heading level, given an element element,
+ perform the following steps: Let level be zero. Let max be zero. If element's local name is If element's local name is If element's local name is If element's local name is If element's local name is If element's local name is Assert: level is not zero. Assert: max is not zero. Add the result of getting an
+ element's computed heading offset given element and max to
+ level. Assert: level is not greather than 9. Return level. To get an element's computed heading offset, given an element element,
+ and a non-negative integer max, perform the following steps. They return a
+ non-negative integer. Let offset be element's If offset is less than zero, set offset to zero. If the Let ancestor be element. While child is not null: Let nextAncestor be the parent node of
+ ancestor within the flat tree. If nextAncestor's Let nextOffset be nextAncestor's If nextOffset is less than zero, set nextOffset to zero. Add nextOffset to offset. If offset is greater than or equal to max, then return
+ max. Return offset.Heading Levels & Offsets
+
+ headingoffset
+ content attribute allows authors to offset heading levels for child elements.headingreset
+ content attribute allows authors prevent a heading offset computation from traversing beyond this
+ point.
+
+
+ h1
then set
+ level to 1 and max to 8.h2
then set
+ level to 2 and max to 7.h3
then set
+ level to 3 and max to 6.h4
then set
+ level to 4 and max to 5.h5
then set
+ level to 5 and max to 4.h6
then set
+ level to 6 and max to 3.
+
headingoffset
attribute value.headingreset
attribute is present, then
+ return offset.
+
+ headingreset
+ attribute is present, then return offset.headingoffset
attribute value.Sample outlines