![How alignment of Text in a HTML-table' src='/howtodo/eh/image/tech/0768576-how-to-align-text-in-an-html-table-1.jpg' /> <br />A HTML table, you can text, images and other elements in your Web page in rows and columns. Each section of the table a cell will be called, and is defined with the]()
" tag. The text can be arranged in each cell, both horizontally and vertically. The "align" attribute allows you to align the text horizontally to the left, middle or right of the cell. The "valign" attribute allows you to align the text vertically to top, center or bottom of the cell.
things you Need
- Open a blank text document in any text editor, such as Notepad.
- Start the HTML document with the following code:
- Type the line "
" is used to define the table.- Enter the row "
" to create the first row.- Define a table cell with the text aligned to the left side by typing
| left | . - Create a table cell with the text aligned to the center by typing
| center | . - you Define a table cell with the text aligned to the right by typing "
| Right | . Other people are reading
Vertical Align tables in HTML
How to make the Text in HTML
- type
at the end of the first line. - Enter the row "
" to start the second line.- Define a table cell with the text aligned to the top of the cell by typing
| top | . - Create a table cell with the text aligned to the center of the cell by typing
| middle | . - Insert a table cell with the text aligned to the bottom of the cell by typing "
| Bottom | . - " to the end of the second row./li>
- Type the following code to close the table and fill in the HTML-document: