HTML & CSS · Junior · Question 53 of 75
What happens if you put a <div> inside a <p> in HTML?
<p>Intro <div>Block</div> text</p>- ✓Correct answer: The parser closes the
<p>before the<div>, so the DOM differs from the markup - 2The
<div>becomes inline automatically - 3Nothing; it's perfectly valid
Explanation
<p> may only contain phrasing content. The browser ends the paragraph early, leaving an empty <p></p> at the end - a frequent source of styling surprises and hydration mismatches.