How to separate paragraphs?

Discussion in 'HTML' started by Nikolay Kurtov, Jun 27, 2007.

  1. Hello.

    I want to make a layout for my blog, so, the content of the page is
    inside one tag, <div class="post_body">...</div>

    I want to have little spaces between lines inside a paragraph and a
    BIG space between different paragraphs.( Paragraph is just some
    sentances connected semantically, not a HTML tag <p> ). But I don't
    know how!!!

    Please, help me!!!
    Nikolay Kurtov, Jun 27, 2007
    #1
    1. Advertising

  2. Nikolay Kurtov

    rf Guest

    "Nikolay Kurtov" <> wrote in message
    news:...
    > Hello.
    >
    > I want to make a layout for my blog, so, the content of the page is
    > inside one tag, <div class="post_body">...</div>


    > I want to have little spaces between lines inside a paragraph and a


    p {line-height: 2em;} ?

    > BIG space between different paragraphs.( Paragraph is just some
    > sentances connected semantically, not a HTML tag <p> ). But I don't
    > know how!!!


    p {margin-bottom: 14em;} ?

    --
    Richard.
    rf, Jun 27, 2007
    #2
    1. Advertising

  3. Nikolay Kurtov

    Andy Dingley Guest

    On 27 Jun, 06:30, Nikolay Kurtov <> wrote:
    > I want to have little spaces between lines inside a paragraph and a
    > BIG space between different paragraphs.( Paragraph is just some
    > sentances connected semantically, not a HTML tag <p> ).


    HTML doesn't have a "paragraph separator". Instead it uses "paragraph
    containers" (<p> ... </p>). It's important to remember the
    difference, because you can't really change this; working "against
    HTML" is harder than working with it.

    You should use the <p> tags to identify the start of paragraphs in
    HTML. That's how it's meant to work, that's how it works best and most
    easily. If you have "sentences connected semantically" then that's a
    paragraph in HTML and you should mark it up as one. If you _insist_ on
    not using <p>, then use <div> (you can nest <div>s)

    If you want to understand how margins work in CSS, particularly
    "collapsing vertical margins", then read this: http://brainjar.com/css/positioning/

    As to your spacing issues, then just the CSS defaults on correct HTML
    markup ought to be a good start for you.

    If you want to vary line height within a paragraph, use
    p { line-height: 1.2; }

    Note that there are no dimensions on the 1.2 value! Don't use ems
    here. 1.2 is the "typical" default, so make it larger or smaller
    according to what you want.

    If you want more spacing between paragraphs, set the bottom margin to
    be bigger
    p { margin-bottom: 2.5em; }
    "Collapsing margins" means that you only need to set one margin,
    usually the bottom is best. Use em units here.
    Andy Dingley, Jun 27, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rlrcstr

    Collapsable paragraphs...

    Rlrcstr, May 16, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    696
    Rlrcstr
    May 17, 2005
  2. EvgueniB
    Replies:
    1
    Views:
    622
    Anthony Borla
    Dec 15, 2003
  3. jersie0
    Replies:
    0
    Views:
    682
    jersie0
    Nov 23, 2003
  4. Jeff
    Replies:
    3
    Views:
    9,131
    kleinbaas
    Apr 13, 2010
  5. Frank Fredstone
    Replies:
    1
    Views:
    435
    Jean-Francois Briere
    Jun 27, 2006
Loading...

Share This Page