Welcome to Bucaro TecHelp!

Bucaro TecHelp
HTTPS Encryption not required because no account numbers or
personal information is ever requested or accepted by this site

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Set the Text Alignment

Use the text-align property to set the text alignment. You can define the text to be aligned center, left, right, or justify.

<p style="text-align:left;">Text aligned left</p>

Text aligned left

<p style="text-align:right;">Text aligned right</p>

Text aligned right

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

Text centered

text-align:justify causes small amounts of spacing to be added between words so that all the lines line up against the left and right margins and have equal width.

Normal paragraph shown below:

As Little Red Riding Hood was going through the woods, she met with a wolf, who had a very great mind to eat her up, but he dared not, because of some woodcutters working nearby in the forest.

text-align:justify paragraph shown below:

As Little Red Riding Hood was going through the woods, she met with a wolf, who had a very great mind to eat her up, but he dared not, because of some woodcutters working nearby in the forest.

the text-align property gives you limited control of text position, if you want more exact control, use the margin-left or margin-right property. The example below aligns the text 100 pixels from the left.

<p style="margin-left:100px;">Text 100 pixels from left</p>

Text 100 pixels from left

More CSS Quick Reference:
• Set the Text Color
• Set the Border Properties
• How to Use a CSS ID Selector
• Set List Properties
• Class Selector
• Use word-wrap Property to allow Line Breaks in the Middle of Words
• Set an Element's Float
• Set The Cursor Style
• Set an Element's Visibility
• Set Text Justification

RSS Feed RSS Feed

Follow Stephen Bucaro Follow @Stephen Bucaro



Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2024 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268