Home  >  Article  >  Web Front-end  >  Detailed introduction to css text properties

Detailed introduction to css text properties

王林
王林Original
2020-05-27 16:51:422816browse

Detailed introduction to css text properties

Text Color

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

The color value is written as follows:

1. Hexadecimal value

such as: #FF0000

2. RGB value

RGB(255,0,0)

3. The name of the color

such as: red

Example:

Detailed introduction to css text properties

Note: If the color attribute is defined for the font, the background color attribute must be defined.

The result shows:

Detailed introduction to css text properties

(Video tutorial recommendation: css video tutorial)

Text arrangement property

The text arrangement property is used to set the horizontal alignment of text. Text can be centered or aligned to the left or right, justified.

Example:

Detailed introduction to css text properties

Text-decoration attribute

The text-decoration attribute is used to set or delete the decoration of text .

This attribute is generally used to remove the underline of the link.

Example:

Detailed introduction to css text properties

Before using this attribute:

Detailed introduction to css text properties

After using this attribute:

Detailed introduction to css text properties

This attribute also has many attribute values, as follows:

Detailed introduction to css text properties

The effect is:

Detailed introduction to css text properties

Text conversion attribute

This attribute is generally used to convert letters in text to uppercase and lowercase.

Example:

Detailed introduction to css text properties

Output result display:

Detailed introduction to css text properties

Text indentation attribute

The text-indent attribute is used to indent the first line of text.

Example:

Detailed introduction to css text properties

The results show:

Detailed introduction to css text properties

If you want to know more For related content, please pay attention to the CSS Basic Tutorial column on the Chinese website of php.

The above is the detailed content of Detailed introduction to css text properties. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn