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:
Note: If the color attribute is defined for the font, the background color attribute must be defined.
The result shows:
(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:
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:
Before using this attribute:
After using this attribute:
This attribute also has many attribute values, as follows:
The effect is:
Text conversion attribute
This attribute is generally used to convert letters in text to uppercase and lowercase.
Example:
Output result display:
Text indentation attribute
The text-indent attribute is used to indent the first line of text.
Example:
The results show:
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!