...

View Full Version : Creating new <p2> tag - formatting



Sherri
09-15-2011, 05:35 PM
Hi. I wanted to created a new paragraph tag <p2> and have done the styling for it in css. However, I don't know how to get it to do a line break after you close the tag.

For example

<p2>First paragraph</p2>
<p2>Second paragraph</p2>

looks like:

First paragraph Second paragraph

BUT, I want:
First paragraph
Second paragraph

How do I stle this in my css p2 { ???? }

Thanks

DanInMa
09-15-2011, 05:37 PM
display: block;

Sherri
09-15-2011, 05:40 PM
Thank you!

tracknut
09-15-2011, 05:59 PM
Um, I have to ask.

Is this for an html document, or for xml? I don't think the HTML standard allows you to "make up" new tags, even in html5. Browsers can/will render them however they like, but the page will be non-compliant, and I suspect IE will choke on such things.

Much better to use <p class="para2">, IMO.

If you're doing this in XML, carry on.

Dave

alykins
09-15-2011, 07:18 PM
Um, I have to ask.

Is this for an html document, or for xml? I don't think the HTML standard allows you to "make up" new tags, even in html5. Browsers can/will render them however they like, but the page will be non-compliant, and I suspect IE will choke on such things.

Much better to use <p class="para2">, IMO.

If you're doing this in XML, carry on.

Dave

I'm glad I wasn't the only one confused... if this makes sense to others can you explain/elaborate (would be greatly appreciated)...
also <p> tags are already block level aren't they?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum