Your markup is invalid. You should not insert the p element inside the p element and therefore the problem.
From W3C :
The P element is a paragraph. It cannot contain the level of a block of elements (including P itself).
Check the source, and you will receive it, because it behaves differently than you expect.

Your browser will really separate all tags and close p elements for you.
So how do we fix this? Use <span> instead of <p>
Demo
source share