CSS defines font spacing font line and line spacing

Source: Internet
Author: User

Source URL: http://www.cnblogs.com/jian1982/archive/2010/07/03/1770349.html

CSS defines the font line spacing line-height:xxpx;

CSS defines font spacing

Let's take a look at the text properties of CSS, or we'll start with a detailed list of text properties:

Property attribute meaning Property value
Word-spacing Defines the spacing between each word Normal<length> must be in the length of the unit
Letter-spacing Defines the spacing between each letter Ditto
Text-decoration Define the "trim" style for text

none|underline|overline|

Line-through|blink

Vertical-align

Defines the element in the vertical direction

On the position

Baseline|sub|super|top|text-top|middle|bottom|text-bottom

<percentage>

Text-transform Convert text to other forms Capitalize|uppercase|lowercase|none
Text-align Defines how text is aligned Left|right|center|justify
Text-indent Defines how the first line of text is indented <length>|<percentage>
Line-height Defines the line height of the text

normal|<unmber>|<length>|

<percentage>

We can see from the table that here you can define text spacing, letter spacing, decorations, alignment, indentation, and line high properties.

Let's take a look at the following example:

CODE:

<p style= "Letter-spacing:5px;text-align:justify;text-indent:4em;line-height:17pt" > We see more space between the text attributes and the lines between the rows and lines, the alignment becomes justified, and the beginning of the paragraph is indented in two more panes. </p>

Letter-spacing set the word spacing to 5px, where 5px is a unit of length, Text-align is set to justify the alignment, indent sets the indent to 4em;line-height set row height to 17pt

From the above example, we can see that the use of CSS text properties can be easily formatted text in the page.

(go) CSS defines font spacing font line and line spacing

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.