HTML table tag tutorial (3): width and height attributes WIDTH, HEIGHT

HTML table tag tutorial (3): width and height attributes WIDTH, HEIGHT

By default, the width and height of the table are automatically adjusted according to the content. We can also manually set the width and height of the table.
Basic syntax
<TABLE WIDTH=VALUE HEIGHT=VALUE>
Syntax explanation <br />The width of the table is defined by the WIDTH attribute, and the height of the table is defined by the HEIGHT attribute. The unit is pixel or percentage. If it 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; if it is a nested table, the percentage is relative to the cell width where the nested table is located.
File example: 10-3.htm
Set the width and height of the table.
01 <!-- ------------------------------ -->
02 <!-- File example: 10-3.htm -->
03 <!-- File Description: Set the width and height of the table-->
04 <!-- ------------------------------ -->
05 <HTML>
06 <HEAD>
07 <TITLE>Set the width and height of the table</TITLE>
08 </HEAD>
09 <BODY>
10 <H1>Mainstream web design software</H1>
11 <TABLE BORDER=1 WIDTH=400 HEIGHT=100>
12 <TR>
13 <TD>Web Graphics Software</TD><TD>Fireworks</TD>
14 </TR>
15 <TR>
16 <TD>Web page creation software</TD><TD>Dreamweaver</TD>
17 </TR>
18 <TR>
19 <TD>Web animation software</TD><TD>Flash</TD>
20 </TR>
21 </TABLE>
22 </BODY>
23 </HTML>
File Description <br />Line 11 defines the table's width as 400 pixels and its height as 100 pixels.

<<:  Solution to Nginx SSL certificate configuration error

>>:  Native JS to achieve image marquee effects

Recommend

Font references and transition effects outside the system

Copy code The code is as follows: <span style=...

How to configure two or more sites using Apache Web server

How to host two or more sites on the popular and ...

Docker creates MySQL explanation

1. Download MySQL Image Command: docker pull mysq...

Complete steps to configure basic user authentication at the Nginx level

Preface Application scenario: probably the intern...

How to use docker to deploy dubbo project

1. First, use springboot to build a simple dubbo ...

A brief comparison of Props in React

Table of contents Props comparison of class compo...

Usage and description of HTML tag tbody

The tbody element should be used in conjunction wi...

How to create a new user in CentOS and enable key login

Table of contents Create a new user Authorize new...

Solution to JS out-of-precision number problem

The most understandable explanation of the accura...

How to capture exceptions gracefully in React

Table of contents Preface ErrorBoundary Beyond Er...

A brief discussion of 12 classic problems in Angular

Table of contents 1. Please explain what are the ...

Example code for implementing a pure CSS pop-up menu using transform

Preface When making a top menu, you will be requi...