This site has been taken over by the staff of www.ASPDeveloper.Net

Please report errors to suggest@aspdeveloper.net

BizTalk Utilities CV ,   Jobs ,   Code library  
 
 

The text-indent property (CSS Reference)

Introduction

The text-indent property is used to indent only the first line of the text to right or left. You can use either the length or percentage to specify the indent. If you use a negative number then the text will be indented to left and positive causes the indentation to right.

Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head><title>text-indent Demonstration</title>

<style type="text/css">

p.indentPositive

{

    text-indent: 25px;

    color:red;

}

p.indentNegative

{

    text-indent: -25px;

    color:blue;

}

</style>

</head>

<body>

<h1><p>text-indent demonstration</p></h1>

<p class="indentPositive">This is some text. We are using the text-indent property here with a positive value. More sentences

here.  More sentences here.  More sentences here.  More sentences here.  More sentences here.  More sentences here.  More

sentences here.  More sentences here.  More sentences here. </p>

<p class="indentNegative">This is some text. We are using the text-indent property here with a negative value. More sentences

here.  More sentences here.  More sentences here.  More sentences here.  More sentences here.  More sentences here.  More

sentences here.  More sentences here.  More sentences here.  More sentences here. </p>

</body>

</html>

Output

Values

Name:

Description:

length

The following values can be also used to define the length of the indent:

cm (centimeter)

em  (ems)

inch (inches)

mm (millimeters)

pc (picas)

px (pixels)

pt (points)

percentage

You can also use percentage to specify the length of the indent. You have to use the percentage sign %.

 

Recent Jobs

Software Specialist, Linux - Finlan
Linux Core Technical Project Manage
Graphics designer at Tanzania. Expe
Integration Specialist Needed - Wor
Virtualization Server Infrastructur

View all Jobs (Add yours)
View all CV (Add yours)






    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP