Меню
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON PHP КАК СДЕЛАТЬ
     ❯   

CSS Справочники


CSS Свойства





text-indent



Example

Indent the first line of text with different values:

div.a {
  text-indent: 50px;
}

div.b {
  text-indent: -2em;
}

div.c {
  text-indent: 30%;
}
Try it Yourself »

Definition text-indent

Подработка: Перевод страницы

The text-indent property specifies the indentation of the first line in a text-block.

Note: Negative values are allowed. The first line will be indented to the left if the value is negative.

Show demo ❯

Default value: 0
Inherited: yes
Animatable: yes. Read about animatable Try it
Version: CSS1
JavaScript syntax: object.style.textIndent="50px" Try it

Browser Support text-indent

The numbers in the table specify the first browser version that fully supports the property.

Property
text-indent 1.0 3.0 1.0 1.0 3.5


CSS Syntax text-indent

text-indent: length|initial|inherit;

Property Values text-indent

Value Description Demo
length Defines a fixed indentation in px, pt, cm, em, etc. Default value is 0. Read about length units Demo ❯
% Defines the indentation in % of the width of the parent element Demo ❯
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Related Pages text-indent

CSS tutorial: CSS Text Spacing

HTML DOM reference: textIndent property



×

Связаться с отделом продаж

Если вы хотите использовать услуги schoolsw3 как образовательное учреждение, команда или предприятие, отправьте нам электронное письмо:
sales@schoolsw3.com

Сообщить об ошибке

Если вы хотите сообщить об ошибке или внести предложение, отправьте нам электронное письмо:
help@schoolsw3.com

Schoolsw3 оптимизирован для обучения и подготовки. Примеры могут быть упрощены для улучшения чтения и обучения. Учебники, ссылки и примеры постоянно проверяются, чтобы избежать ошибок, но мы не можем гарантировать полную правильность всего контента.
При использовании Schoolsw3 вы соглашаетесь прочитать и принять наши условия использования,
политику использования файлов cookie и конфиденциальности.

Авторское право 1999- © Copyright. Все права защищены. Schoolsw3 работает на SW3.CSS.