Problem Statement
Which tag is used to define a standard data cell in a table?
Explanation
The td tag is used to define a standard data cell in a table. The td stands for table data. Each td tag represents one cell in the table containing actual data. Data cells are placed inside tr tags. By default, the content in td cells is left-aligned and displayed in normal font weight. You can include any HTML content inside td tags, including text, images, links, or even other tables. Each td in a row creates a new column. The number of td tags in each row determines the number of columns in your table. Understanding the difference between td for data and th for headers is important for creating semantic and accessible tables.
Code Solution
SolutionRead Only
<!-- Table with data cells -->
<table>
<tr>
<td>Apple</td>
<td>$2.50</td>
</tr>
<tr>
<td>Banana</td>
<td>$1.80</td>
</tr>
<tr>
<td>Orange</td>
<td>$3.00</td>
</tr>
</table>