HTML/CSS's paragraph layout

Source: Internet
Author: User

Indent first line in paragraph layout

In the Chinese text before the paragraph is used to empty two blank text, this special style can be implemented with the following code:


P{text-indent:2em, write the following code in the head.

<style type= "Text/css" >P{TEXT-INDENT:2EM;} </style><strong> Note: 2em means twice times the size of the text. </strong><span style= "color: #FF0000;" >text-indent</span> is the meaning of indentation
Line spacing of paragraph layout
<span style= "FONT-SIZE:18PX;" ><strong><span style= "color: #FF0000;" >p{line-height:1.5em;} </span></strong></span>


Paragraph layout--word spacing, letter spacing

If you want to set the text interval or the letter spacing in the page layout, you can use letter-spacing to implement

h1{letter-spacing:20px};

What if I want to set the spacing between English words? Can be implemented using word-spacing . The following code:

h1{word-spacing:20px;}

Paragraph layout--alignment

Do you want to set the center style for text and pictures in a block element ? You can use the Text-align style code

<style type= "Text/css" >
Div{text-align:center;} Text-align means text-to-align, which can be followed by Left,right,center.
</style>


HTML/CSS's paragraph layout

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.