HTML table width and Height properties width

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.