The text-align property aligns the text in an element.

Inherited:   Yes

Examples

p {text-align: center}

 

Possible Values

Value Description
left Aligns the text to the left
right Aligns the text to the right
center Centers the text
[string] Specifies a string around which cells in a table column will align. Only applies to table cells. If used for other element types, it will be treated as as “left” or “right” depending on the current language writing direction (”left” for English.)
inherit Explicitly sets the value of this property to that of the parent.
justify justified text

 

 

One Response to “CSS TEXT-ALIGN”

  1. jeffrey wimmer Says:

    Ok, I may be an idiot here, but does the example go up in the css/style sheet area or is it an inline command in front of the actual text in a webpage? Most tutorials never give enough examples to help beginners understand the command.

    Thank you

Leave a Reply