CSS paragraph indentation text-indent usage

Source: Internet
Author: User

Paragraph indentation is very practical, with the P tag can play an unexpected effect. The paragraph indent definition in CSS is implemented by text-indent, below its parameters and usage:

Syntax: Text-indent:〈 value

Allowable value: Length or Percentage

Initial value: 0

The text indent attribute can be applied to block-level elements (P,H1, etc.). or user-defined where the first line of the paragraph takes effect, the value must be an integer or a percentage. If the percentage is the CSS will automatically find the ancestor element width set value, the specific code example:

The P {text-indent:20px} means that the paragraph indents 20 pixel values, about the width of two characters empty.

In this way, the body area of the page with

Label, you can indent backwards 20 pixels, so that the entire article layout more standardized. If you don't use it, you can also define it in places where you need to indent, such as a tag:

The CSS control paragraph indentation is very practical, just define once, increase the readability of the article, can improve the browsing experience of the page.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.