0

I've never seen this behaviour before, but I got a <p> with some "sub-divs" like this:

<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, Stet 
  <div href="#" class="l-definition" data-label="test">Chromium
    <div class='definition'>Test</div>
  </div> 
  kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>


When I open up my webpage then, it "splits up" my code into this: Problem

It closes the <p> too early and creates a <p></p> at the end.

Does anyone know, why this problem occurs?

Tobias Glaus
  • 3,008
  • 3
  • 18
  • 37

1 Answers1

-1

p tag is a block level element, and is (supposed to be) used for displaying text, it won't allow other block level elements inside it, but only inline ones like span and strong