Should I be using nav or ul

前端 未结 8 1980
挽巷
挽巷 2020-12-31 06:41

I\'m making a navigation menu, should I be using the

8条回答
  •  余生分开走
    2020-12-31 07:29

    nav is an semantic html5-element, which was introduced to point out, that this code is the navigation of your page. For "normal nonsemantic" search engines it makes no difference wether you use ul or nav. They will understand both without problems. At the moment using those semantic elements creates no real advantage for you.

    Be careful, using those html5-elements breaks IE, so you need to "register" them, so IE recognizes them as stylable html-elements.

提交回复
热议问题