HTML Table: Specifying the size of a table

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

By default, a table sizes itself to accommodate all of its cells, and each cell’s height and width changes to accomodate the largest entry in that row or column.

We can set the size of the table to 100%.  This forces the table to expand to fill up the browser window.

<!DOCTYPE html>
<head lang='en'>     
    <meta charset='UTF-8'>
    <title> Table</title>

<table border='1' width='100%'>
        <td>Rod Stewart</td>
        <td>Maggie May</td>

</html> Table

Series Navigation<< HTML Table: Row with a different cell number
HTML Table: Setting the size of the table in pixel >>

Leave a comment

Leave a Reply