Tables are widely used in website design for displaying grouped data in the table format. Historically they have been used to structure website's layout. This method, while can be effective and simple, causes issues with the flexibility of tables.
When we look at a tables, they can be split into two sections, rows and columns. There is a specific tag for a table row,
</tr>. Columns also have tags which are
When it comes to tables in html, columns are included inside rows, so this means that we must use the row first. You can see this in the example below
<table> <tr> <td>Cell A</td> <td>Cell B</td> <td>Cell C</td> </tr> <tr> <td>Cell D</td> <td>Cell E</td> <td>Cell F</td> </tr> </table>
|Cell A||Cell B||Cell C|
|Cell D||Cell E||Cell F|
Adding a border to a table is very straight forward, it's as simple as adding a border attribution. This will look something like
Below is an activity to test your HTML knowledge so far. Give it a try.
<html> <head> <title>Sample Page</title> </head> <body> </body> </html>