The Wayback Machine - https://web.archive.org/web/20090109154322/http://www.webreference.com/html/tutorial7/6.html


spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

I Shot the Serif

Text Properties Continued


Developer News
Cisco Lawsuit: A Test for the GPL?
Shifts for Enterprise Linux, Green Networks in '09
Gifts for All in Linux 2.6.28

The text-align property

Property:text-align
Accepted values:left, right, center or justified
Initial value:Depends on user agent
Applies to:Block-level Elements
Inherited:Yes

The text-align property applies to block-level elements and affects the alignment of the text. Text can be aligned with the left margin, the right margin, both (justified) or centered.

<P STYLE="text-align: left">Some text on the left. 
Some text on the left. Some text on the left. 
Some text on the left. Some text on the left. 
Some text on the left. Some text on the left. 
Some text on the left. Some text on the left. 
Some text on the left. Some text on the left. 
Some text on the left. Some text on the left. 
Some text on the left. Some text on the left.</P>

<P STYLE="text-align: right">Some text on the right. 
Some text on the right. Some text on the right. 
Some text on the right. Some text on the right. 
Some text on the right. Some text on the right. 
Some text on the right. Some text on the right. 
Some text on the right. Some text on the right. 
Some text on the right. Some text on the right. 
Some text on the right. Some text on the right.</P>

<P STYLE="text-align: center">Some text in the middle. 
Some text in the middle. Some text in the middle. 
Some text in the middle. Some text in the middle. 
Some text in the middle. Some text in the middle. 
Some text in the middle. Some text in the middle. 
Some text in the middle. Some text in the middle. 
Some text in the middle. Some text in the middle.</P>

<P STYLE="text-align: left">Some text all over. 
Some text all over. Some text all over. Some text all over. 
Some text all over. Some text all over. Some text all over. 
Some text all over. Some text all over. Some text all over. 
Some text all over. Some text all over. Some text all over.</P>

Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left. Some text on the left.

Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right. Some text on the right.

Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle. Some text in the middle.

Some text all over. Some text all over. Some text all over. Some text all over. Some text all over. Some text all over. Some text all over. Some text all over. Some text all over. Some text all over. Some text all over. Some text all over. Some text all over.

The text-indent property

Property:text-indent
Accepted values:length
Initial value:0
Applies to:Block-level Elements
Inherited:Yes

The text-indent property is used to indent the first line of a block element by a certain length.

<P STYLE="text-indent: 1cm">This is an indented paragraph. This is an
indented paragraph. This is an indented paragraph. This is an indented
paragraph. This is an indented paragraph. This is an indented paragraph.
This is an indented paragraph. </P>

This is an indented paragraph. This is an indented paragraph. This is an indented paragraph. This is an indented paragraph. This is an indented paragraph. This is an indented paragraph. This is an indented paragraph.

The line-height property

Property:line-height
Accepted values:normal, or a length, or a number
Initial value:0
Applies to:All Elements
Inherited:Yes

The line-height property, which can be specified using the font shorthand property, specifies the height of a line of text, which can either be normal, or equal to a specific length, or certain times the size of the font.

<P STYLE="line-height: 2">A Wide Paragraph. A Wide Paragraph. A Wide
Paragraph. A Wide Paragraph. A Wide Paragraph. A Wide Paragraph. A Wide
Paragraph. A Wide Paragraph. A Wide Paragraph.</P>

A Wide Paragraph. A Wide Paragraph. A Wide Paragraph. A Wide Paragraph. A Wide Paragraph. A Wide Paragraph. A Wide Paragraph. A Wide Paragraph. A Wide Paragraph.

That's all the properties I'm going to teach you today. Let's see if you can put them together.

Front Page123456789

http://www.internet.com

Produced by Stephanos Piperoglou

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Copyright 2008 Jupitermedia Corporation All Rights Reserved.

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Overview of Popular JavaScript Frameworks - ASP.NET AJAX · An Introduction to 3D · Email Marketing Terms to Know
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Configuring Anonymous Dialog Security in SQL Server 2005 Express Service Broker Conversation · OpenVPN: Revoking Access and Expanding Management Options · Connecticut Town Lays Groundwork for Merged School, Municipal VoIP Network


All Rights Reserved. Legal Notices.

URL: http://www.webreference.com/html/tutorial8/
Created: Oct 20, 1998
Revised: Nov 3, 1998

Morty Proxy This is a proxified and sanitized view of the page, visit original site.