DFS MB SDN Stuff PIX CAL Ranges Wine Cellars Electronics Shop



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>

Menu:
Intro to CSS Main Page Fun With Font: Font Families Fun With Fonts: Font Styles Fun With Fonts: Font Weights Fun With Fonts: Font Sizes Fun With Text: Color Fun With Text: Decoration Fun With Text: Transformation Fun With Text: Alignment Fun With Text: Indentation Fun With Background: Color
Related:
Dave's Fun Stuff's Stuff Your Screen Size Electricity Rates HTML Colors Small Color Tables Large Color Tables Color Spans Creating CSS Colorful Link Buttons PC Keystroke Codes Eat More Potassium! Intro to CSS D.T.'s Web Icons Optical Illusions Star Codes Windows Alt Codes Fun With Money Bits 'N' Bytes Celebrity Autographs TV Died Fast Food Fish Sandwich Reviews San Diego Apartment and Condo Maps Calendar History Jesus' Date of Conception Calendar Coincidence Software You Need DFS Bookmarks MikeMan Stupid Cat Videos Unicode Madness Unicode Tables Emoji Codes Alternative Letter Codes Unicode Country Flag Codes Game Piece Codes Dingbat Codes
Market Zone:
Amazon Shopping The DFS Market
TV Zone:
Find your favorite TV shows with "Let's Watch TV!"
Notable:
The Del: Dave's Entertainment Library! Celebrities a2z Hit Song Titles Stuff! Gregorian Calendar Collection Desktop Gregorian Calendar Collection (Mobile)-English Picture Gallery SDN Media News and More
Footer:
Dave's Fun Stuff Mega Birthdays Contact Webmaster



© 1995-2018. davesfunstuff.com All Rights Reserved. Reproduction of any part of this website without expressed written consent is prohibited.

Website Cookie Policy