Why we always use
    to make Navigation why not
      ?

前端 未结 7 1208
北荒
北荒 2020-12-17 11:05

Why do we always use

    to make navigation why not
      ? While we can use both technically.

7条回答
  •  半阙折子戏
    2020-12-17 11:36

    Because semantically ul makes more sense if you don't care about the order of menu items.

    If you need items to be somehow numbered or when the order has meaning, then we use ol.

    If you're not interested in semantic markup but only in appearance, you can use either. Or even neither, use divs and spans and anything else to achieve the needed appearance.

提交回复
热议问题