Semantic implications of multiple
tags

后端 未结 2 1561
旧巷少年郎
旧巷少年郎 2021-01-12 13:28

When using

lists to associate keys to values, is there a semantic difference between these 2 samples? Which one provides better semantics? What do multiple
2条回答
  •  耶瑟儿~
    2021-01-12 13:57

    The relevant part of the dl definition is:

    The values within a group are alternatives; multiple paragraphs forming part of the same value must all be given within the same dd element.

    I think a clear example would be a dl describing homonyms, e.g. "bank":

    bank
    An institution where one can place and borrow money and take care of financial affairs.
    An edge of river, lake, or other watercourse.
    A row or panel of items stored or grouped together.

    ↑ Here the term "bank" (dt) has three meanings (dd). Using one dd with a ul wouldn’t hold the same semantics:

    bank
    • An institution where one can place and borrow money and take care of financial affairs.
    • An edge of river, lake, or other watercourse.
    • A row or panel of items stored or grouped together.

    ↑ Here the term "bank" would have only one meaning (and this meaning consists of or is described by a ul).

    Coming back to your author example, you’d typically want to use the first variant (as described by BoltClock), because each author really is a "value" (dd) in the group of authors.

    However, in the end it depends on your content and, more importantly, on your understanding of that content.

提交回复
热议问题