Text Alignment
Sometimes we don't want the text to be aligned to the left, but in the center or right. We can use the text-align
property for text alignment, which can have the following values: left, center, right.
For example:
h1 {
text-align: center;
}
This will align the first-level headings to the center.
Instructions
Align the second-level headings (h2
) to the center.
Start programming for free
6/9