width: ***; height: ***;

  • IE
  • Cr
  • Sf
  • Fx
  • O

The width property specifies the width of an element, and the height property specifies the height of an element.

The width and height of the table can be specified by applying these properties to the TABLE element.

table {
width: 300px;
height: 200px;

Property Value Explanation
width length, %, or auto the size of the width
height length, %, or auto the size of the height

The default is "auto".


<title>TAG index</title>

<style type="text/css">

table {
border: 2px #2b2b2b solid;
width: 250px;
height: 150px;

td, th {
border: 2px #2b2b2b solid;



<th>Heading A</th>
<th>Heading B</th>
<td>Cell A</td>
<td>Cell B</td>


Heading A Heading B
Cell A Cell B