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.
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;
}
<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!
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
cross browser sticky header and footer using css
5 Awesome CSS3 Buttons with Smooth Animation
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 .
Topics