Indenting the First Line
Description
The text-indent
property
controls how to specify an indentation for the first line of a block of text.
It isexpressed either as a length or as a percentage of the width of the containing element.
Example
The following code shows the use of text-indent
Property.
<!DOCTYPE HTML>
<html>
<head>
<style>
p {<!-- w w w . ja v a2 s. c o m-->
margin: 15px;
padding: 5px;
border: medium double black;
background-color: lightgrey;
float:left;
text-indent: 15%;
}
</style>
</head>
<body>
<p>this is a test.</p>
</body>
</html>