Quantcast
Channel: CSS Tutorial » Killer CSS Tips and Tricks
Viewing all articles
Browse latest Browse all 10

Centering Text with CSS

$
0
0

Centering text and other elements can easily be done with the CSS text-align property. It can be applied to a division, the p tag – pretty much any block-level element.

Applying this to an internal or external stylesheet:

p {text-align: center;}

or this to inline styling:

<p style="text-align: center;">This is centered text</p>

will center your text.


Viewing all articles
Browse latest Browse all 10

Trending Articles