CSS Text Align – Centered, Justified, Right Aligned Text Style Example
![](https://www.freecodecamp.org/news/content/images/2022/01/ss-3-4.png)
We use the CSS text-align property to align content inside a block-level element. Examples of block-level elements are paragraphs (<p></p>), divs ( <div></div>), sections (<section></section>), articles ( <article></article>), and so on. This alignment affects the horizontal axis only. So the text-align property is different from the vertical-align property which we
We use the CSS text-align property to align content inside a block-level
element.
Examples of block-level elements are paragraphs (<p></p>), divs (
<div></div>), sections (<section></section>), articles (
<article></article>), and so on.
This alignment affects the horizontal axis only. So the text-align property is
different from the vertical-align property which we use to set the vertical
alignment of an element.
Table of Contents
* Basic Syntax
* Values of the text-align Prope
![](https://blog.hubspot.com/hs-fs/hubfs/Google%20Drive%20Integration/html%20right%20align%20text%20(update).png?width=650&height=228&name=html%20right%20align%20text%20(update).png)
How to Left, Right & Center Align Text in HTML
![](https://blog.hubspot.com/hs-fs/hubfs/Google%20Drive%20Integration/how-to-center-text-css-div-text-align.png?width=650&name=how-to-center-text-css-div-text-align.png)
How to Center Text & Headers in CSS Using the Text-Align Property
![](https://blog.hubspot.com/hs-fs/hubfs/center-align-example-classpass.jpg?width=650&height=331&name=center-align-example-classpass.jpg)
How to Left, Right & Center Align Text in HTML
Text Align - Tailwind CSS
![](https://miro.medium.com/v2/resize:fit:1168/1*Abht5_NHXGuUHB1C7kU5Jw.png)
Text Alignment In SwiftUI. The are different ways to align…, by Ed
![](https://www.wikihow.com/images/thumb/e/eb/Align-Something-in-HTML-Step-3-Version-5.jpg/v4-460px-Align-Something-in-HTML-Step-3-Version-5.jpg.webp)
Fare una passeggiata Allineare Disgusto div text align center
![](https://blog.hubspot.com/hs-fs/hubfs/Google%20Drive%20Integration/how-to-center-text-css-vertically-padding.png?width=1476&name=how-to-center-text-css-vertically-padding.png)
Fare una passeggiata Allineare Disgusto div text align center
![](https://webstyleguide.com/wsg2/type/graphics/5.05a.gif)
TYPOGRAPHY: Alignment
![](https://www.freecodecamp.org/news/content/images/2022/01/ss-2-3.png)
CSS Text Align – Centered, Justified, Right Aligned Text Style Example