,

,

… tags, inline within paragraphs (

)

前端 未结 6 525
遥遥无期
遥遥无期 2020-12-03 11:04

I\'m trying to have tags inside paragraphs, like:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam pulvinar

6条回答
  •  眼角桃花
    2020-12-03 11:28

    The

    tag can only contain inline elements. The header tags are block-level elements, and cannot go inside

    tags even when you style them to display inline.

    They're semantically incorrect given this usage anyways - paragraphs shouldn't have headers randomly floating around inside them. Consider proper use of and tags, or if they're really not what you're trying to describe, use tags with specific classes.

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam pulvinartincidunt neque, at blandit leo mattis vitae. Cras placerat justo vel risus porta cursus. Nullam eget sem nibh. Sed mattis facilisis rhoncus. Morbi sit amet nisl lectus.

提交回复
热议问题