Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating new <p2> tag - formatting

    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

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    display: block;

  • #3
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you!

  • #4
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,260
    Thanks
    10
    Thanked 277 Times in 276 Posts
    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

  • #5
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,739
    Thanks
    41
    Thanked 191 Times in 190 Posts
    Quote Originally Posted by tracknut View Post
    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?

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •