html5, figure/figcaption inside a paragraph gives unpredictable output

前端 未结 1 1782
遥遥无期
遥遥无期 2020-12-31 19:00

The following markup uses the figure element to display an image, inline with the text of a paragraph -- hence the figure is \'included\' inside the first

相关标签:
1条回答
  • 2020-12-31 19:07

    The figure element is block level and therefore the behavior is correct. Permitted parent tags are those that allow flow elements - http://dev.w3.org/html5/markup/figure.html (example div, section, article...)

    Therefore the figure tag should be placed outside the p tag. You can float it to allow for wrap.

    0 讨论(0)
提交回复
热议问题