Text Alignment
Now we are going to learn the use of text alignment.
Start with separating the sentences in the second paragraph into separate
paragraphs.
You should now have four paragraphs.
There are three types of alignment;
- left
- center
- right
They are written as follows;
- align="left"
- align="center"
- align="right"
Whichever one you choose it will do just like it says. In the first paragraph we want it to stay to the left. Left alignment is the default setting for browsers so we do not have to do anything special for having text align on the left.
We want the second paragraph to be centered on the page so we need to specify
this. In the opening paragraph tag we need to add a space after the p and then
type align="center".
<p align="center">
We want the third paragraph to be aligned to the right on the page so we need
to specify this. In the opening paragraph tag we need to add a space after the p
and then type align="right".
<p align="right">
As you can see the second paragraph is centered in the browser and the third paragraph is aligned to the right.