how to align table cells in html code example

Example 1: td align top

<td style="vertical-align:top">
	<p>Content</p>
</td>

Example 2: how to center a table in html

<table style="border:1px solid black;margin-left:auto;margin-right:auto;">

Example 3: html td tag

<table>
  <tr>
    <th>Column 1 Heading</th>
    <th>Column 2 Heading</th>
  </tr>
  <tr>
    <td>Data in Column 1, Row 2</td>
    <td>Data in Column 2, Row 2</td>
  </tr>
  <tr>
    <td>Data in Column 1, Row 3</td>
    <td>Data in Column 2, Row 3</td>
  </tr>
  <tr>
    <td>Data in Column 1, Row 4</td>
    <td>Data in Column 2, Row 4</td>
  </tr>
</table>

Tags:

Css Example