faqts : Computers : Internet : Web : HTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

38 of 52 people (73%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How can I justify text within a page? As opposed to left, right align.
How can I justify text within a page?

Mar 13th, 2001 12:09
Ben Gordon, Rey Nuņez, unknown unknown, http://www.w3.org/TR/html4/present/graphics.html#h-15.1.2


<p align=justify> ... </p>
applies the style to a specific paragraph. To apply the style to all 
paragraphs within a page, you can define the style in a style sheet 
embedded on the page.
NOTE: The above method of alignment is depreciated under the HTML 4.01 
guideline in favor of CSS example listed below
<style type="text/css">
<!--
p {text-align:justify}
-->
</style>
For even greater flexibility, you can apply the style to all paragraphs 
site-wide thru a linked style sheet.