How To: Vertical Align at the Top of a Table in HTML

HTML is a formatting language for displaying information on webpages. While there are many different ways to structure the information on a page, one common method is through the use of tables. Each HTML table contains at least one row, and each row contains at least one cell. However, it is possible that you could have a row with multiple cells and that one of those cells could be vertically larger than the other. The default display will center the smaller cell, but you can modify the display so that the cell is vertically aligned at the top of the table.

Instructions

    • 1

      Open your Web editing program.

    • 2

      Click "File" at the top of the window, then click "Open" to browse to and open the HTML page containing the table that you wish to adjust.

    • 3

      Scroll through your HTML page until you find the table containing the information that you want to vertically align. If your Web editing program has a "Design" and a "Code" view, select the "Code" view option.

    • 4

      Click your mouse inside the "<td>" tag for the table cell containing the data that you want to vertically align at the top of the table.

    • 5

      Modify the "<td>" tag so that it reads as follows:

      <td valign="top">

Tips & Warnings

  • You can also use the "valign" modifier to align your information at the bottom of the table. The context for that display is:

  • <td valign="bottom">

Related Searches:

References

Comments

Related Ads

Featured