Languages
[Edit]
EN

CSS - text align left

0 points
Created by:
Wayne
475

In this article, we would like to show you how to align text to the left using CSS.

Quick solution:

 

Practical example

Edit

In this example, we create a style for  .element class that uses text-align property to align text inside div element to the left side.   

Note:

You can also use text-align: start which is a new standard solution, however it is supported by all major browsers since 2020. For legacy purposes, we use text-align: left in the example.

 

See also

Edit
  1. CSS - text align right

  2. CSS - text align center

  3. CSS - text align justify

References

Edit
  1. text-align - CSS: Cascading Style Sheets | MDN

Alternative titles

  1. CSS - move text to the left
  2. CSS - place text on the left
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join