filmov
tv
CSS Tutorial for Beginners Tamil - 07 - CSS TEXT PROPERTY
Показать описание
CSS Text Property
1. Text Color
2. Text Alignment
3. Text Decoration
4. Text Transformation
5. Text Spacing
6. Text Shadow
1.Text Color
The color property is used to set the color of the text. The color is specified by:
• a color name - like "red"
• a HEX value - like "#ff0000"
• an RGB value - like "rgb(255,0,0)"
Look at CSS Color Values for a complete list of possible color values.
body {
background-color: lightgrey;
color: blue;
}
2.Text Alignment
The text-align property is used to set the horizontal alignment of a text.
A text can be left or right aligned, centered, or justified.
The following example shows center aligned, and left and right aligned text (left alignment is default if text direction is left-to-right, and right alignment is default if text direction is right-to-left):
text-align: center;
text-align: left;
text-align: right;
3.CSS Text Decoration
Text Decoration
The text-decoration property is used to set or remove decorations from text.
text-decoration: overline;
text-decoration: line-through;
text-decoration: underline;
text-decoration: none;
4.CSS Text Transformation
The text-transform property is used to specify uppercase and lowercase letters in a text.
It can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word:
text-transform: uppercase;
text-transform: lowercase;
text-transform: capitalize;
5. CSS Text Spacing
Text Indentation
The text-indent property is used to specify the indentation of the first line of a text:
text-indent: 50px;
Letter Spacing
The letter-spacing property is used to specify the space between the characters in a text.
The following example demonstrates how to increase or decrease the space between characters:
letter-spacing: 3px;
letter-spacing: -3px;
Line Height
The line-height property is used to specify the space between lines:
line-height: 0.8;
Word Spacing
The word-spacing property is used to specify the space between the words in a text.
The following example demonstrates how to increase or decrease the space between words:
word-spacing: 10px;
6.CSS Text Shadow
Text Shadow
The text-shadow property adds shadow to text.
In its simplest use, you only specify the horizontal shadow (2px) and the vertical shadow (2px):
text-shadow: 2px 2px;
text-shadow: 2px 2px red;
THANK YOU : ) - TECH TAMIZHAN
1. Text Color
2. Text Alignment
3. Text Decoration
4. Text Transformation
5. Text Spacing
6. Text Shadow
1.Text Color
The color property is used to set the color of the text. The color is specified by:
• a color name - like "red"
• a HEX value - like "#ff0000"
• an RGB value - like "rgb(255,0,0)"
Look at CSS Color Values for a complete list of possible color values.
body {
background-color: lightgrey;
color: blue;
}
2.Text Alignment
The text-align property is used to set the horizontal alignment of a text.
A text can be left or right aligned, centered, or justified.
The following example shows center aligned, and left and right aligned text (left alignment is default if text direction is left-to-right, and right alignment is default if text direction is right-to-left):
text-align: center;
text-align: left;
text-align: right;
3.CSS Text Decoration
Text Decoration
The text-decoration property is used to set or remove decorations from text.
text-decoration: overline;
text-decoration: line-through;
text-decoration: underline;
text-decoration: none;
4.CSS Text Transformation
The text-transform property is used to specify uppercase and lowercase letters in a text.
It can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word:
text-transform: uppercase;
text-transform: lowercase;
text-transform: capitalize;
5. CSS Text Spacing
Text Indentation
The text-indent property is used to specify the indentation of the first line of a text:
text-indent: 50px;
Letter Spacing
The letter-spacing property is used to specify the space between the characters in a text.
The following example demonstrates how to increase or decrease the space between characters:
letter-spacing: 3px;
letter-spacing: -3px;
Line Height
The line-height property is used to specify the space between lines:
line-height: 0.8;
Word Spacing
The word-spacing property is used to specify the space between the words in a text.
The following example demonstrates how to increase or decrease the space between words:
word-spacing: 10px;
6.CSS Text Shadow
Text Shadow
The text-shadow property adds shadow to text.
In its simplest use, you only specify the horizontal shadow (2px) and the vertical shadow (2px):
text-shadow: 2px 2px;
text-shadow: 2px 2px red;
THANK YOU : ) - TECH TAMIZHAN
Комментарии