为什么h1到h6中的HTML标签不同,而不是像这样的语法?
Headings
Six levels of heading are supported. (Note that a hypertext node
within a hypertext work tends to need less levels of heading than
a work whose only structure is given by the nesting of headings.)
A heading element implies all the font changes, paragraph breaks
before and after, and white space (for example) necessary to render
the heading. Further character emphasis or paragraph marks are not
required in HTML.
H1 is the highest level of heading, and is recommended for the
start of a hypertext node. It is suggested that the the text of
the first heading be suitable for a reader who is already browsing
in related information, in contrast to the title tag which should
identify the node in a wider context.
The heading elements are
,
,
,
,
,
您还必须意识到原始HTML规范中的属性使用最少。每个元素都用于标记文档,强调易于编写和易于阅读。我只能假设行的标记会被拒绝,因为输入的时间太长,会妨碍页面的内容。
该用法早于任何外部样式表的概念,因此选择器在决定命名约定时不能发挥任何作用。
一旦定义了元素,就没有理由重命名它们,因为它会导致向后兼容性问题。