Question

See this link: http://codepen.io/anon/pen/IEpGz

If you use the code inspector in both FF and Chrome, you will see the following (concatenated):

<p>
  Search Engine 
</p>


<p>
</p>  

Yet if you CTRL+U to view the source, you see this:

<p>
  Search Engine 

</p>

The latter is the intended result. I'm not sure where the extra <p> is coming from?

Was it helpful?

Solution

That's a consequence of an attempted recovery from invalid HTML.

A <p> cannot contain <div>.

Use a validator.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top