HTML Tables

Tables let you organize data in rows and columns. You create a table using the <table> tag, rows with <tr>, and cells with <td>. To label your columns, use <th> for header cells, which will often appear bolded.

Tutorials dojo strip

HTML Tables Syntax

Explanation of Syntax:

  • <table>: This is the main tag for creating a table.
  • <tr>: Defines a table row.
  • <th>: Table header cell, typically bold and centered. It’s often used at the top to label the columns.
  • <td>: Table data cell, which holds the actual data in the table.
HTML




HTML Tables Example Code

Explanation of Code:

  • border="1": This attribute gives each cell a visible border, making the table easier to read.
  • <th> and <td>: The <th> tags create header cells labeled “Title” and “Year,” while <td> tags define the data cells for each movie.
HTML




HTML Labs

Tutorials dojo strip