Home

1. Introduction

2. Basics review

3. WIDTH

4. VALIGN

5. BORDER

6. BGCOLOR

7. CELLSPACING

8. CELLPADDING

9. ALIGN

10. Table manners

11. Editors

12. Summary

13. Exercises



Classes home

HTML Info home

 

VALIGN

VALIGN stands for vertical alignment. The arguments for it are top, middle, bottom, and baseline.

Adding VALIGN="top" attributes to <td> (or cell) tags ensures that cell contents will line up at the top.

Before code: table without VALIGN

   <table border=1 width="100%">
     <tr>
        <td width="20%">Return..</td>
        <td width="80%">Welcome..</td>
     </tr>
   </table>

Before results: table without VALIGN:

Return to home

Welcome to my home page. I'm so glad that you're here!

Be sure to sign my guestbook and register for my free drawing. A new winner will be picked every month!

Also, don't forget to play my new Java-enhanced "Whack-a-Bill" game in the "Games and Entertainment" area.

Thank you for coming by!

After code: table with VALIGN

   <table border=1 width="100%">
     <tr>
        <td width="20%" valign="top">Return..</td>
        <td width="80%">Welcome..</td>
     </tr>
   </table>

After results: table with VALIGN

Return to home

Welcome to my home page. I'm so glad that you're here!

Be sure to sign my guestbook and register for my free drawing. A new winner will be picked every month!

Also, don't forget to play my new Java-enhanced "Whack-a-Bill" game in the "Games and Entertainment" area.

Thank you for coming by!

Note 1: HALIGN - horizontal align - is also available for table cells. Because this simply repeats left/right/center alignments of text tags, it's not as useful as VALIGN

Note 2: To the best of my knowledge, attribute ordering makes no difference.

   <td width="20%" valign="top"> is the same as
   <td valign="top" width="20%">