HTML Table Row, Table Heading, Table Definition

 

1. TR (Table Row)

The <tr> tag is used to define a row in an HTML table. It contains table cells (<th> or <td>).

Example:

<table border="1">
    <tr>
      <td>Row 1, Cell 1</td>
      <td>Row 1, Cell 2</td>
    </tr>
    <tr>
      <td>Row 2, Cell 1</td>
      <td>Row 2, Cell 2</td>
    </tr>
  </table>

2. Table Heading (<th>)

The <th> tag defines a table header cell. By default, table headers are bold and centered.

Example:

<table border="1">
    <tr>
      <th>Header 1</th>
      <th>Header 2</th>
    </tr>
    <tr>
      <td>Data 1</td>
      <td>Data 2</td>
    </tr>
  </table>

3. Table Data Cell (<td>)

The <td> tag is used to define a standard data cell in a table. It holds the content for each cell.

Example:

<table border="1">
    <tr>
      <td>Cell 1</td>
      <td>Cell 2</td>
    </tr>
  </table>

Comments

Popular posts from this blog

Introduction to Computer

History of Computer

Computer Generation