Text-Align property in CSS - Style attribute : Web Programming with Python and JavaScript

Опубликовано: 26 Март 2026
на канале: Wild4Change_Motivation_Education
21
3

The text-align property in CSS is used for aligning the inner content of a block element.

text-align: center;

These are the traditional values for text-align:

left – The default value. Content aligns along the left side.

right – Content aligns along the right side.

center – Content centers between the left and right edges. White space on the left and right sides of each line should be equal.

justify – Content spaces out such that as many blocks fit onto one line as possible and the first word on that line is along the left edge and the last word is along the right edge.

inherit – The value will be whatever the parent element’s is.

“Content” is used here as as term instead of “text”, because while text-align certainly affects text, it affects all inline or inline-block elements in that container.