Actually, you don’t need the DIV or span in your case. P is already a block element. Use a SPAN if you want part of the P to have a different style than the rest. you also have to make sure your code is clean you had a couple of unclosed tags… that WILL WRECK stuff… just so you know.
Use a heading tag - that’s what they are there for. Don’t absue divs or paragraphs just to make headings.Just add a class and style them as needed.
Make sure you use the appropriate heading level though as they must make structural and logical sense. (e.g h1 is the main heading and then follows h2, he etc… read this.)
Paul beat me to it – I was about to rage on you for that.
Seriously, every time I see code like:
<p><div class=“style1”>Heading</div></p>
I have the overwhelming urge to pimp slap somebody Avery Brooks style… That’s a H2 or H3’s job… Likely the second paragraph has that div and class for nothing as well – at the very LEAST the div for nothing.
What is the CONTENT you are marking up? If we had an example of what it is you are actually working on, we could probably tell you what markup to use – semantics is NOT just about slapping paragraphs around everything (much less div inside P, which is just FAIL). Once we knew what markup to use, THEN we could tell you how to style it.