【问题标题】:Can we have ul inside a paragraph [duplicate]我们可以在段落中包含 ul [重复]
【发布时间】:2017-07-20 07:20:18
【问题描述】:

所以我有一个段落,我需要在其中列出我要描述的内容,如下所示

<p>Further, to meet the diverse requirements of the clients, we offer the range in custom designs.
   <ul>
    <li>Features:
       Elegant colors
       Aesthetic designs
       Matchless combination</li>
   </ul>
</p>

这似乎不起作用,我该怎么做。

【问题讨论】:

  • 老兄,列表不是段落。

标签: html css


【解决方案1】:

没有。见the spec

段落可以包含“Phrasing content”。不包括列表元素。

短语内容是文档的文本,以及在段落内级别标记该文本的元素。段落中的短语内容运行。

a abbr area(如果它是 map 元素的后代) audio b bdi bdo br button canvas cite code data datalist del dfn em embed i iframe img input ins kbd keygen label map mark math Meter noscript object output progress q ruby s samp script select small span strong sub sup svg template textarea time u var video wbr text

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-30
    • 1970-01-01
    • 2011-12-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多