You are at the section Intro to CSS
Fun With Text: Alignment
Using the p element: (you can also use body, div, h1, h2, h3, h4, h5, and h6 elements too)
<p style="INSERT CSS HERE">
Here are some examples using the text alignment feature. Let's start with center
<p style="text-align:center">
This is the text centered.
</p>
This is right-justified
<p style="text-align:right">
This is the right justified
</p>
And finally, for long paragraphs, justified on both columns. When text-align is set to "justify", each line is stretched so that every line has equal width, and the left and right margins are straight (like in magazines and newspapers).
<p style="text-align:justify">
This is a really long paragraph aligned on both ends.
This is a really long paragraph aligned on both ends.
This is a really long paragraph aligned on both ends.
This is a really long paragraph aligned on both ends.
This is a really long paragraph aligned on both ends.
This is a really long paragraph aligned on both ends.
This is a really long paragraph aligned on both ends.
</p>
© 1995-2023. davesfunstuff.com. All Rights Reserved. Reproduction of any part of this website without expressed written consent is prohibited.
Help Support Our Ad-Free Web Section
Just use our PayPal link to pay.
Please to help pay for webhosting, domain payments, expenses and labor in keeping this section going. Thank you.
,
,
,
,
,
,
,
Notice Of Disclosure (updated June 2023):
"David Tanny is the owner and operator of the domains davesfunstuff.com and davidtanny.com"