Menu
The text-indent
property designates a positive or negative value for the indentation of the first line of text in an element.
If the text-indent property is set to a negative value, the first line will be indented to the left.
p.px {
text-indent: 25px;
}
p.em {
text-indent: -5em;
}
p.per {
text-indent: 15%;
}
length
Designates a fixed indentation in standard length units, such as px, pt, em, etc. Default value is 0.
%
Designates a fixed indentation in percentage of the width of the parent element.
initial
Sets the property to its default value.
inherit
Inherits this property’s value from its parent item.
Have a code example of text-indent
? Submit a codepen.io demo and we'll showcase it here ↴