HTML Table: Row with a different cell number

This entry is part 3 of 16 in the series HTML Table

In the previous example, the table have the same number of cells in the rows.

If we have a row with a cell less than the others, we would have a table illustrated by the example below.

In the tr tag in line 15, it has one <td> tag less than the <tr> in line 10.

<!DOCTYPE html>
<html>
<head lang='en'>     
    <meta charset='UTF-8'>
    <title>Codecrawl.com-HTML Table</title>
</head>
<body>

<table border='1'>
    <tr>
        <td>ID</td>
        <td>artiste</td>
        <td>album</td>
    </tr>
    <tr>
        <td>1</td>
        <td>Rod Stewart</td>
    </tr>
</table>

</body>
</html>
Codecrawl.com-HTML Table

Series Navigation<< HTML Table: Table without table header
HTML Table: Specifying the size of a table >>

Leave a comment

Leave a Reply