Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to set the first line indentation in html

Shulou Source: shulou.com Published: 2022-05-31 12:45:51 11月12日 Update

This article mainly explains "how to set the first line indentation in html". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to set the first line indent in html".

In HTML, you can use the text-indent attribute to set the first line indentation, simply by setting "text-indent: indent value" for the text element. The text-indent attribute specifies the indentation of the first line of text in the text block; negative values are allowed, and if negative values are used, the first line is indented to the left.

The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.

Indent 2 characters. P {text-indent: 2em;} kindness is your nature, beauty is your nature, cleverness is your advantage, virtue is your capital, gentleness is your mark, sincerity is your character, International Working Women's Day, I wish you happiness, youth and beauty all your life!

Warm March, spring return to the earth, sunny, green grass, organize your thoughts, pick up your mood, feel a good life, taste International Working Women's Day wonderful, women want to be nice to themselves, happy holidays, I wish you forever young!

Effect:

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

Note: negative values are allowed. If you use a negative value, the first line is indented to the left.

Note: prior to CSS 2.1, text-indent always inherited calculated values, not declared values.

Thank you for your reading, the above is the content of "how to set the first line indentation in html". After the study of this article, I believe you have a deeper understanding of how to set the first line indentation in html, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Negative values attributes text learning youth content women that is guilds kind bright beautiful smart virtuous happy happy gentle spring back to the earth Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MariaDB MySQL Apple vpn