CSS tutorial - part 4: text
Posted by admin in css, Tutorial
Adding layout to text on webpage is very important and useful. Here are text properties that will help you layout and style text on your website.
- The ‘
text-indent‘ property applys an indent to the first line of the paragraph.
p {
text-indent:20px;
} - The ‘
text-align‘ property sets text alignment. You can align text toleft,right,centerorjustify.
h1 {
text-align: center;
} - The ‘
text-decoration‘ property sets different decorations to text. You can undeline it, have line trough or above it.
p {
text-decoration: line-through;
}
h1 {
text-decoration: underline;
} - The ‘
letter-spacing‘ property sets the space between text characters.
p {
letter-spacing: 2px;
} - The ‘
text-transform‘ property defines the capitalization of a text. You can usecapitalize(first letter of each word),uppercase(all letters),lowercase(all letters) ornone(no transformation).
h1 {
text-transform: uppercase;
}
Applying layout and style to text - checked.


