Text Alignment and Sizing
Learn how to manipulate a web page's text in detail.
We'll cover the following
Text alignment
By default, text elements are aligned to the left of their container. Use the text-align
property to change the alignment of text within an element. text-align
has four different values:
center
: Center the text.left
: Align the text to the left of its container.right
: Align the text to the right of its container.justify
: The text will spread out to fill out the full width of its container.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy