Quackit Logo

FREE Hosting!

With every domain name you register with ZappyHost, you get FREE hosting.

PLUS you get:

  • FREE Website Builder
  • FREE Blog
  • FREE Starter Web Page
  • FREE Email Account
  • & much more! (Total value $123 for FREE!)
Get your FREE hosting today! >>

CSS text-align

Print Version

Also see the full, alphabetical list of CSS properties


The CSS text-align property is used for aligning elements left, right, center etc.

Although the property name is "text-align", according to the CSS specification, it applies to inline content of a block element. This implies that you aren't just limited to aligning text - that the text-align property can be used to align any element within a block level element. This appears to be how most browsers interpret the property too.

Syntax: text-align: <value>
Possible Values:
  • left
  • right
  • justify
  • <string> - for example, a full stop (period). This value only works on table cells.
  • inherit
Initial Value: Depends on browser/user agent and the writing direction
Applies to: Block level elements
Inherited: Yes
Media: Visual
Example:
td { text-align: right }
Try it yourself! HTML Editor


Also see all CSS properties listed alphabetically


Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
                     
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!