我在段落元素中放置了一个DIV,并注意到DIV总是从新行开始,而不管DIV的样式设置为display:inline;。然后我读到: Paragraphs are block-level elements, and notably will automatically close if another block-level element is parsed before the closing p tag
可以采取任何措施来防止这种行为吗?
<!DOCTYPE html>
<html>
<body>
<p>
<label>ITCL</label>
<div style="display:inline;">
OR
</div>
</p>
<div>
<label>ITSC</label>
<div style="display:inline;">
MM
</div>
</div>
</body>
</html>