By default, the width and height of the table are automatically adjusted to the content, and we can manually set the width and height of the table.
Basic syntax
<table Width=value height=value>
Grammar explanation
You define the width of the table by the Width property, which defines the height of the table, in pixels or as a percentage. If this is a percentage, it can be divided into two cases: if it is not a nested table, the percentage is relative to the browser window, and if it is a nested table, the percentage is relative to the cell width of the nested table.
File Example: 10-3.htm
Sets the width and height of the table.
<!---------------------------------->
<!--file Example: 10-3.htm-->
<!--file Description: Set the width and height of the table-->
<!---------------------------------->
<HTML>
Modified <HEAD>
<TITLE> set the width and height of the table </TITLE>
</HEAD>
<BODY>
<H1> Mainstream web design software </H1>
One <table border=1 width=400 height=100>
<TR>
<TD> Web image Software </TD><TD>Fireworks</TD>
</TR>
<TR>
<TD> Web making software </TD><TD>Dreamweaver</TD>
</TR>
<TR>
<TD> Web animation software </TD><TD>Flash</TD>
</TR>
</TABLE>
</BODY>
</HTML>
File description
The
Line 11th defines a table with a width of 400 pixels and a height of 100 pixels.