What is semantic markup, and why would I want to use that?

后端 未结 5 1730
余生分开走
余生分开走 2021-02-14 07:12

Like it says.

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-14 08:17

    Semantics literally means using "meaningful" language; in Web Development, this basically means using tags and identifiers which describe the content.

    For example, applying IDs such as #Navigation, #Header and #Content to your

    tags, rather than #Left, and #Main, or using unordered lists for a list of navigational links, rather than a table.

    The main benefits are in future maintenance; you can easily change the layout or the presentation without losing the meaning of your content. You navigation bar can move from the left to the right, or your links displayed horizontally rather than vertically, without losing the meaning.

提交回复
热议问题