4. CSS text

Source: Internet
Author: User

CSS text color:

The Color property is used to set the color of the text.

Colors are most often specified by CSS:

Hexadecimal values-such as: #ff0000

An RGB value-such as: rgb (255,0,0)

Name of the color-such as: red

Example--->

{ color:red;}  { color:#00ff00;}  { color:rgb (255,0,0);}

How to align CSS text:

Text arrangement properties are used to set the horizontal alignment of text

Text can be centered or aligned to the left or right, justified

When Text-align is set to "justify", each line is expanded to equal width, left and right margin are aligned (such as magazines and newspapers)--->

{ text-align:center;}    /* Center */  { text-align:right;}    /* Align to right */  { text-align:justify;}    /* Align Left and right margin */


CSS Text decoration:

The Text-decoration property is used to set or remove the decoration (underline) of text--->

{ text-decoration:none;}    /* suppress the underline of a text hyperlink */


You can also decorate text--->

{ text-decoration:overline;}     /* Dash up */  { text-decoration:line-through;}    /* Delete Line */  { text-decoration:underline;}    /* Underline */

CSS Text conversion:

Text conversion properties are used to specify uppercase and lowercase letters in a text

Can be used to turn all words into uppercase or lowercase letters, or capitalize the first letter of each word--->

{ text-transform:uppercase;}    /* Uppercase */  { text-transform:lowercase;}    /* lowercase */  { text-transform:capitalize;}    /* Capitalize first letter */

CSS Text indentation:

The text indent property is used to specify the indentation of the first line of text--->

{ text-indent:50px;}

4. CSS text

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.