Text Align
text-align
, like a Word or Google Doc, can be used to change the way your text is formatted on a page. This can be very important, as the way you display information on a page can affect a viewers understanding of your content. If you want your text to appear like it usually does, that means your text is aligned to the left
. If you want the opposite of this, then you can align your text to the right
. If you want it smack-bang in the middle of the page, you can use center
, and if you want it to fill all the space you’ve provided, you can use justify
.
Example
I can use text-align
to change the way my heading looks on the page:
h1 {
text-align: center;
}
If you want to know more about the text-align
property, you can go to the links at MDN Web Docs or w3schools. Both of these sites give excellent examples of the text-align CSS property that are interactive, and allow you to change and alter the values to see how the property works.