In HTML5, should the main navigation be inside or outside the
element?

前端 未结 5 1018
不思量自难忘°
不思量自难忘° 2020-12-22 15:30

In HTML5, I know that

5条回答
  •  甜味超标
    2020-12-22 15:46

    To expand on what @JoshuaMaddox said, in the MDN Learning Area, under the "Introduction to HTML" section, the Document and website structure sub-section says (bold/emphasis is by me):

    Header

    Usually a big strip across the top with a big heading and/or logo. This is where the main common information about a website usually stays from one webpage to another.

    Navigation bar

    Links to the site's main sections; usually represented by menu buttons, links, or tabs. Like the header, this content usually remains consistent from one webpage to another — having an inconsistent navigation on your website will just lead to confused, frustrated users. Many web designers consider the navigation bar to be part of the header rather than a individual component, but that's not a requirement; in fact some also argue that having the two separate is better for accessibility, as screen readers can read the two features better if they are separate.

提交回复
热议问题