top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Which property is used to indent the text of a paragraph in CSS?

0 votes
361 views
Which property is used to indent the text of a paragraph in CSS?
posted Jun 27, 2017 by Saheb Pro

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

text-indent

The text-indent property specifies the amount of indentation (empty space) should be left before lines of text in a block. By default, this controls the indentation of only the first formatted line of the block, but the hanging and each-line keywords can be used to change this behavior.

Syntax

text-indent: length|initial|inherit;

Values

length
Defines a fixed indentation in px, pt, cm, em, etc. Default value is 0.
percentage (%)
Defines the indentation in % of the width of the parent element.
initial
Sets this property to its default value.
inherit
Inherits this property from its parent element.

Example

/* Length values */
text-indent: 3mm;
text-indent: 40px;

/* Percentage value (%)
   relative to the containing block width */
text-indent: 15%;

/* Keyword values */
text-indent: 5em each-line;
text-indent: 5em hanging;
text-indent: 5em hanging each-line;

/* Global values */
text-indent: inherit;
text-indent: initial;
text-indent: unset;
answer Jun 29, 2017 by Sumana
...