A <p> paragraph element can only contains inline elementd.
A <p> paragraph element is of type block...
So, a <p> cannot be in a <p> nor have a <p> inside it.
Anyway, html us permissive, and browers are intented to try theur best even if the html code is not valid:
... is interpreted as the valid code:
... where no <p> is child of another p. So, class 'myclass' is only applied to the first part of the breaked <p> (only to 'hello', not to 'world' nor to '!' ^^