H1 in article page - site title or article title?

前端 未结 8 740
天涯浪人
天涯浪人 2021-02-01 00:27

Within an article-oriented page (such as a blog post), the

element (level 1 heading) is commonly used to markup either:

  • the blog title (i.e

相关标签:
8条回答
  • 2021-02-01 01:16

    There is a W3C Quality Assurance tip about this topic:

    <h1> is the HTML element for the first-level heading of a document:

    • If the document is basically stand-alone, for example Things to See and Do in Geneva, the top-level heading is probably the same as the title.

    • If it is part of a collection, for example a section on Dogs in a collection of pages about pets, then the top level heading should assume a certain amount of context; just write <h1>Dogs</h1> while the title should work in any context: Dogs - Your Guide to Pets.

    0 讨论(0)
  • 2021-02-01 01:24

    On Wikipedia the h1-Tag contains the article-name and headings in the document start with h2. The name Wikipedia is part of the title-tag in the html-header. I also think that's the way to go. So for blogs I would do like Joel Spolsky in the examples you have given.

    And I would always start with the highest level, so letting out h1 is in my opinion a bad option.

    0 讨论(0)
提交回复
热议问题