Use CSS to implement paragraph indent two words in front

Source: Internet
Author: User
Tags object empty implement relative

Core TIP: the paragraph is empty two words before the distance, do not use space. You should use the first line indent text-indent. Text-indent can make the first line in the container indent a certain unit. For example, Chinese paragraphs usually empty two characters before each paragraph.

<style type= "Text/css" >
<!--
p{
Text-indent:2em; /*em is the relative unit, 2EM is now twice times the size of a word * *
}
-->
</style>


<p> the distance before the paragraph is empty two words, do not use the space again. You should use the first line indent text-indent. Length Unit em. The font size relative to the text within the current object. Our first line was indented 2em. 2EM is now twice times the size of a word. </p>

Empty two words before the paragraph, do not use the space again. You should use the first line indent text-indent. Text-indent can make the first line in the container indent a certain unit. For example, Chinese paragraphs usually empty two characters before each paragraph.

Here we need to know a length unit em. EM is the relative length unit. The font size relative to the text within the current object. We usually empty two Chinese characters before each paragraph. In fact, the first line is indented 2em.




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.