Even More HTML
Computing Resources >> Tutorials >> Web Development >> Even More HTML   

Text Alignment

Tables: Basics

Nested Tables

Experience Table

Definition Lists

Anchors

Colors & Links

Other Tags

Tutorial Handout

Evaluate this tutorial

 

 

Text Alignment

Justification and Alignment
Text Alignment gives you more control over the layout of your page. Alignment is an attribute that can be used to right justify, left justify or center text on your page. We will use the “divisions” tag <div>…</div> to align your name and email address. All text within the tag is justified according to the align attribute:

< div align=left>…</div> to left justify
< div align=right >…</div> to right justify
< div align=center >…</div> to center justify

Step One:
Open yourlastname.html

Step Two:
In the body of the page (between <body>…</body>) type:
< div align=left>
<font size=+1>
<b>YourName </b>
</font>
< /div>
< div align=right>
yourlogin@gslis.utexas.edu
< /div>

Step Two:
Save and load into your web browser. Your page will look like this:

YourName

yourlogin@ischool.utexas.edu

Center Alignment
Now we will use the <p align=center>…</p> tags to center your name and email address on the page.

Step One:
Open yourlastname.html

Step Two:
Delete the code we just wrote.

Step Three:
In the body of the page (between <body>…</body>) type:
< div align=center>
<h2>YourName</h2>
yourlogin@ischool.utexas.edu
< /div>

Step Four:
Save and load into your web browser. Your page will look like this:

 

YourName

yourlogin@ischool.utexas.edu

next section >

 

 

© 2003 Mrudula Yadav | iSchool | UT Austin | webmaster