How to indent first line of a paragraph?

5 replies
  • WEB DESIGN
  • |
Hi, I hope I'm in the right place if this is for help with HTML problems...

Anyway, I would like to know how to indent the first line of each paragraph. I've tried searching online but it's not what I'm looking for. This is what I mean (I've taken some paragraphs from my site and pasted them here):

Dear reader,

Do you ever have times where you just can't focus on anything? Does it ever feel like you have hundreds of thoughts swirling through your mind like a circus of monkeys marching down a parade?

It's pretty crazy, you know, how distracting our lives can be at times. I know that even as you're reading this, there might be tons of distractions going on around you right now, so I applaud you for getting this far...

And this is what I'm hoping for...

Dear reader,

[Space here] Do you ever have times where you just can't focus on anything? Does it ever feel like you have hundreds of thoughts swirling through your mind like a circus of monkeys marching down a parade?

[Space here] It's pretty crazy, you know, how distracting our lives can be at times. I know that even as you're reading this, there might be tons of distractions going on around you right now, so I applaud you for getting this far...

In Microsoft Word, all you need to do is press Tab... but do you know I can do it online for each of my paragraphs?

#indent #line #paragraph
  • Profile picture of the author john_kennedy
    p
    {
    text-indent:50px;
    }

    Use that bit of CSS. It won't work well with older browsers though.
    {{ DiscussionBoard.errors[5764448].message }}
    • Profile picture of the author Keep Trying
      Originally Posted by john_kennedy View Post

      p
      {
      text-indent:50px;
      }

      Use that bit of CSS. It won't work well with older browsers though.
      Hey John, I've inserted the code you gave me into my CSS. It helped indent all my paragraphs (thank you), but it affected my header too which I don't want. Do you know how to make it so that it doesn't indent my header? ...and possibly "Dear reader" below it?

      (See what I mean below)
      How To Focus Better
      {{ DiscussionBoard.errors[5764636].message }}
  • Profile picture of the author Istvan Horvath
    Originally Posted by Keep Trying View Post

    In Microsoft Word, all you need to do is press Tab...
    Thanks God, the internet is not based on MS Word

    There are different rules; I'd even say: more normal rules...

    Furthermore, while you can do it, it is unusual for hypertext and it is not expected. It is a different medium, you know - with different rules, different expectations and different display/design approach.

    As for your follow-up question: unless the paragraphs are in a div that can be defined in the stylesheet, e.g.
    .divname p {...}
    You cannot do it easily.

    If you want only certain paragraphs to be with indent, you will need to add their own separate class to each instance of such paragraphs:

    HTML - <p class="ugly">TEXT HERE </p>
    CSS - .ugly {text-indent:50px;}
    Signature

    {{ DiscussionBoard.errors[5764689].message }}
  • Profile picture of the author Keep Trying
    Thank you.
    {{ DiscussionBoard.errors[5773118].message }}
  • Profile picture of the author john_kennedy
    Ahh, you left out the crucial bit of information...I am using WP!~

    So, in that case, go to Appearance->Editor and you should find your style.css file waiting to be edited. If not, click on the style.css file on the right side.

    Scroll down until you see this:

    .entry p {
    font-size: 16px;
    line-height: 1.8em;
    margin-bottom: 15px;
    }
    and change it to:

    .entry p {
    font-size: 16px;
    line-height: 1.8em;
    margin-bottom: 15px;
    text-indent:50px;
    }
    {{ DiscussionBoard.errors[5810859].message }}

Trending Topics