Page 1 of 1

Internal p tags causing loss of styling

Posted: Fri Feb 22, 2008 4:21 pm
by HiddenS3crets
My page has a main <p> tag for an entire body of text, and inside of that text I have another <p> tag. The problem is that everything after the internal <p> (but still inside the main <p> tag) loses its styling.

I took a screen shot of a simple example on the w3schools website.

Here's the link: http://img182.imageshack.us/img182/6469/ssbw0.png

You can see that p.one colors the text red while p.two colors blue. Once I place p.two inside of p.one, I lose styling for text after. Any ideas?

Re: Internal p tags causing loss of styling

Posted: Fri Feb 22, 2008 7:31 pm
by califdon
I don't think you can nest paragraph tags. Most browsers default to ending a paragraph if it encounters another <p> tag before an ending </p> tag. Old web coders used to be sloppy and omit closing <p> tags. Sloppy, but it works. Actually, you should never want to nest paragraph tags. You should be using some other tag, or you should end one paragraph and begin another.

Re: Internal p tags causing loss of styling

Posted: Fri Feb 22, 2008 7:38 pm
by HiddenS3crets
that seems to make sense, thanks man