Tables are very useful elements in HTML that developers use to structure a website. This shot shows us how to use and implement a table in HTML.
There are multiple elements that make up a full-fledged table.
<table>
: It defines and wraps everything regarding the table.<thead>
: It is the table header.<tr>
: It is the table row.<th>
: It is the header cell.<tbody>
: It is the table body.<td>
: It is the table cell.Let’s now look at how we can structure the table. The following example, alongside comments, would help us with it.
In line 10 to 32 we start creating table using <table> <\table>
tag this table contains two column
and one
row. <tr>
represents the rows and <td>
represents the columns . They also have a heading <heading>
, which makes by default text appear bold. They also have a body <tbody>
to hold the information we want.
RELATED TAGS
CONTRIBUTOR
View all Courses