为什么HTML中的h1-h6标签名称不同?

ehd*_*hdv 3 html history

为什么在HTML 中h1使用h6不同的标签,而不是像语法一样<heading level="1">?我很想知道决定背后的历史(与同为不同的列表,ol并且ul,而不是常见的列表).

到目前为止,我的研究还没有改变.在W3C规范实际上团体它们都作为"标题",描述他们联合.曾经有人在Stack Overflow上问过一个类似的问题,但是这个讨论是关于语义的价值,而不是这个特定语言设计选择的推理.

编辑:我不是在问一个或另一个的SEO含义,我正在寻找有关为什么HTML的创建者选择他们所做的语法的答案.

编辑2:这个问题可以引出很多意见,但存在一个事实答案,Jukka在下面的评论中找到了它:http://infomesh.net/html/history/early/.我认为这个讨论的一部分是在HTML首次创建时得到的,并且正在寻找而不是试图重新讨论这个争论.

zzz*_*Bov 7

为什么h1到h6在HTML中有不同的标签,而不是像这样的语法<heading level="1">

因为这是他们最初在1993年定义的方式:

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

                <H1>, <H2>, <H3>, <H4>, <H5>, <H6>

您还必须意识到原始HTML规范中的属性使用最少.每个元素都用于标记文档,强调易于编写和易于阅读.我只能假设一行中的标签<heading>会被拒绝,因为输入的时间太长,会妨碍页面的内容.

该用法早于任何外部样式表的概念,因此选择器在决定命名约定时不能发挥任何作用.

一旦定义了元素,就没有理由重命名它们,因为它会导致向后兼容性问题.