A compendium of CSS manuals: Text properties

Source: Internet
Author: User
Tags object lowercase
Css

CSS Properties:

6. Text Property:

The properties here affect the display of text in the WEB document.

Text-indent Property Describes how the text is indented:

Property name : ' Text-indent '
Property values : <length> | <percentage>
Initial value : 0
Fit Object : container element
Whether to inherit : Yes
Percent Note : depends on the width of the parent element

The following example shows a paragraph with an indentation value of 3em:

P {Text-indent:3em}

The Alignment property indicates how the text is aligned:

Property name : ' Alignment '
Property value : Left | right | center | justify
Initial value : according to User defined
Suitable object : Block-level elements
Whether to inherit : Yes
Percent remark : prohibited

The text-decoration property Describes how to modify text:

Property name : ' Text-decoration '
Property value : none | [Underline | | overline | | line-through | | blink]
Initial value : none
Fit Objects : all elements
Whether to inherit : No (see clarification below)
Percent remark : prohibited

Property value meanings are:
underline: underline.
overline: underline.
line-through: Delete line.
blink: Flashing (as with the function of the blink tag in Navigator )

The Text-shadow property can add shadow effects to Text:

Property name : ' Text-shadow '
Property values : none | <color> [, <color>]*
Initial value : none
Fit Objects : All
Whether to inherit : No
Percent Note : valid only when describing transparency

For example:

P {Text-shadow:black}

The above example displays a black shadow at the bottom right of the text, and the shadow increases the area of the BOX .

letter-spacing property indicates the spacing of text: property name : ' letter-spacing '

Property value : normal | <length> | auto
Initial value : normal
Fit Objects : all elements
Whether to inherit : Yes
Percent remark : prohibited

For example:

BLOCKQUOTE {Letter-spacing:0.1em}

The word-spacing property indicates the spacing of words in the text:

Property name : ' word-spacing '
Property value : normal | <length>
Initial value : normal
Fit Objects : all elements
Whether to inherit : Yes
Percent remark : prohibited

For example:

H1 {Word-spacing:1em}

The text-transform property can display text in BOX in the specified uppercase or lowercase format:

Property name : ' Text-transform '
Property value : Capitalize | uppercase | lowercase | none
Initial value : none
Fit Objects : all elements
Whether to inherit : Yes
Percent remark : prohibited

The attribute value means:
capitalize: Capitalize the first letter of every sentence in box .
uppercase: Turn all the letters in box into uppercase.
lowercase: Turn all the letters in box to lowercase.

The white-space property describes how to display spaces in the text, in HTML , where spaces are omitted, which means that you have two methods to enter a space, regardless of how many spaces you enter at the beginning of a paragraph mark. One is to enter the code of the space directly "", or use the <pre> tag,CSS also developed similar to the pre properties:

Property name : ' White-space '
Attribute value : normal | pre | nowrap
Initial value : normal
Fit Object : container element
Whether to inherit : Yes
Percent remark : prohibited

For example:

PRE {White-space:pre}
P {White-space:normal}



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.