Home>Article>Web Front-end> How to set table width in HTML
How to set the table width in HTML: 1. Directly use the width attribute of the table tag, with the syntax "
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
After adding a border to the table tag using the border attribute, the default width is determined by the content inside:
商品 价格 T恤 ¥100 牛仔褂 ¥250 牛仔库 ¥150 Rendering:
Then How to set table width?
Method 1: Use the width attribute of the table tag
商品 价格 T恤 ¥100 牛仔褂 ¥250 牛仔库 ¥150 Rendering:
Method 2: Use the style attribute to add the "width: width value;" style
商品 价格 T恤 ¥100 牛仔褂 ¥250 牛仔库 ¥150 Rendering:
( Learning video sharing:css video tutorial, "html video tutorial")
"; 2. Use the style attribute in the table tag and add "width :width value;" style.
The above is the detailed content of How to set table width in HTML. For more information, please follow other related articles on the PHP Chinese website!