【问题标题】:Nested small elements嵌套小元素
【发布时间】:2020-03-23 21:22:20
【问题描述】:

嵌套small 元素是否有效且语义正确?

例如:

<section>
  <p>[…]</p>
  <p>What particular element of the time in which they were born has an effect on their character is something for which I still do not have a definitive conclusion, but the fact is as observable as it is impossible to ignore. People born around the same time are very similar (regarding those characteristics that are based on their birth dates, and isolating them from other elements such as physique, education, and others).</p>
  <footer>
    <p><small>[Note 2]</small> In the same way that it is possible to gather certain elements of an irrational person’s character from their physique, date of birth, and name, it is in turn possible to deduce these characteristics from the observations of the subject’s character.</p>
    <p><small>[Definitive examples can be found at <small>{A., No. 215}</small>.]</small></p>
  </footer>
</section>

问题不在于 my 示例在语义上是否正确,而在于嵌套 small 元素是否在语义上正确(在任何示例中)。

【问题讨论】:

    标签: html semantic-markup


    【解决方案1】:

    它在句法上有效。


    至于语义:specification 说:

    小字体通常包含免责声明、警告、法律限制或版权。小字体有时也用于署名或满足许可要求。

    small 元素不会“降低”或降低 em 元素强调的文本的重要性,也不会降低 strong 元素标记为重要的文本的重要性。要将文本标记为不强调或不重要,请不要分别使用 em 或 strong 元素进行标记。

    我看不出任何可以通过将小文本放在一段小文本中来表达的语义含义。


    问题不在于我的示例在语义上是否正确,而在于嵌套小元素是否在语义上正确(在任何示例中)。

    正如我所说,我想不出任何例子,但无论如何都要处理你的例子:

    • &lt;small&gt;[Note 2]&lt;/small&gt; 看起来应该是一个标题(或者可能是一个命名的锚点)。
    • &lt;small&gt;[Definitive examples... 可能是旁白。
    • &lt;small&gt;{A., No. 215}&lt;/small&gt; 看起来应该是引用。

    【讨论】:

    • 在我的示例中,small 元素表示由其他人而不是主要作者添加的注释。例如,footer 是作者预期的该部分的页脚,small 是与该内容相关的其他注释。
    • @VorganHaze — 这不是 small 所定义的含义。
    • 另外,你能想出一个使用语义正确的嵌套small元素的例子吗?
    • @VorganHaze — 我说我不能回答......两次。
    猜你喜欢
    • 2020-11-29
    • 2017-05-24
    • 2014-07-07
    • 1970-01-01
    • 2014-07-05
    • 1970-01-01
    • 2021-07-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多