css text-indent

  June 21,2010   Read: 966 Times

Hello everyone, welcome to my today's post on CSS text-indent. The CSS text-indent property is used for indenting the first line of text. If your browser recognizes the CSS text-indent property, you will notice that the first line of this text has been indented.

The rest of the text is rendered without the indent. I've add full css script with this tutorial.

- CSS Scripts For text-indent property: 

body{
    font-family: verdana; 
    font-size: 12px;
}
p{
  text-indent: 15px; 
  width: 400px; 
  border: 1px solid lightblue;
  line-height: 1.8em; 
  background: whitesmoke;
}
div{
    text-indent: 15px; 
    width: 400px; 
    border: 1px solid lightgray;
    line-height: 1.8em; 
    background: wheat;
}
h2{
    font-size: 13px;
}

- HTML Scripts For text-indent property:

<h2>Apply CSS text-indent property in heading element</h2>
<p>Apply CSS text-indent property in paragraph element</p>    
<div>Apply CSS text-indent property in paragraph element</div>

Then, when the next paragraph comes along, the first line is indented again! Check demo URL and download full code!

Demo

Download

Was this information useful? What other tips would you like to read about in the future?  Share your comments, feedback and experiences with us by commenting below!

  You might also like...

  10 Best CSS Editor For Freelance Web Designers

  Create a cool CSS3 Pricing table less then 15 min

  3 Animated CSS3 Download Buttons

  Super Useful CSS3 Tools For Web Developer

  Facebook like loading animation using css3

Share:

  Author: Md Mahbub Alam Khan (255 Posts)

Md Mahbub Alam Khan is the Editor and Founder of CoolAJAX Web Blog. You can follow CoolAJAX on Twitter , on Facebook or you can subscribe via RSS .

Write For Us & Be An Exclusive Post Author!

Previous tutorial No Preious Post Available!
comments powered by Disqus