html - 我怎样才能把DIV放在P里?

标签 html css

如何在段落中放置div?我将显示更改为内联,但浏览器将基本段落划分为两个元素,而 div 将不是段落的成员。

最佳答案

形成 w3 站点:

The P element represents a paragraph. It cannot contain block-level elements (including P itself).

关于html - 我怎样才能把DIV放在P里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5441639/

相关文章:

javascript - 在 Canvas 上绘制形状

html - Div 未对齐

html - 元素未正确包含在 Internet Explorer 11 的卡片页脚中

html - 使 <body> 和 <html> 标签成为页面的 100%

php - 如何为文本创建动态颜色?

javascript - 单击触发器时不会出现 div

javascript - onsubmit 和确认总是处理表单?

html - 当图像最终通过媒体查询隐藏时,延迟和手动控制 <img> 加载

html - 带有未排序列表的 CSS3

css - 将四个不同的 div 垂直居中