Quackit Logo
Sponsored Links
FREE Hosting!
With every domain you register with ZappyHost you get FREE hosting.
$1.99 Domain Names
With every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99.
Create a website for free - uCoz
Build a website quickly and easily Customizable templates and graphics

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!


Also see all CSS properties listed alphabetically


Enjoy this website?

  1. Add this page to your Favorites
  2. Link to this page (copy/paste into your own website or blog):
  3. Help support Quackit by making a donation
  4. Add this page to your favorite social bookmarks sites:      

Oh, and thank you for supporting Quackit!