CSS text-align Property

Last Updated On Thursday 11th Aug 2022

text align css

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

	div {
  text-align: center;
}
	

css text align

Syntax

	text-align: start;
text-align: end;
text-align: left;
text-align: right;
text-align: center;
text-align: justify;
text-align: justify-all;
text-align: match-parent;
	

Using the keyword values start, end, left, right, center, justify, justify-all, or match-parent.

Another Example

	h1 {
    text-align: center;
}

p.date {
    text-align: right;
}

p.main {
    text-align: justify;
}
	
Property Chrome Edge Mozilla Safari Opera
text-align 1.0 3.0 1.0 1.0 3.5
align text in css
css text centering
css text align center
css center text