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

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

In HTML5, I know that

5条回答
  •  隐瞒了意图╮
    2020-12-22 15:57

    I do not like putting the nav in the header. My reasoning is:

    Logic

    The header contains introductory information about the document. The nav is a menu that links to other documents. To my mind this means that the content of the nav belongs to the site rather than the document. An exception would be if the NAV held forward links.

    Accessibility

    I like to put menus at the end of the source code rather than the start. I use CSS to send it to the top of a computer screen or leave it at the end for text-speech browsers and small screens. This avoids the need for skip-links.

提交回复
热议问题