3 ways to cancel: 1. Add the "border:none" borderless style to the td element, with the syntax "td{border:none}". 2. Add the "border:0" style to the td element, the syntax is "td{border:0;}", and set the width of the td border to 0. 3. Add the "border:transparent" style to the td element, with the syntax "td{border:transparent;}", and set the color of the td border to transparent.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
<table border="1"> <tr> <th>商品</th> <th>价格</th> </tr> <tr> <td>T恤</td> <td>¥100</td> </tr> <tr> <td>牛仔褂</td> <td>¥250</td> </tr> <tr> <td>牛仔库</td> <td>¥150</td> </tr> </table>
So how to cancel the td border in Html5? Here are several methods.
1. Add the "border:none;" style to the td element
The border attribute sets all border attributes. When the value is none, it means that the label element is not Set the border attribute or cancel the border attribute to define a borderless style.
<style> td{ border:none; } </style>
2. Add the "border:0;" style to the td element
By setting the width of the border to 0 Remove
<style> td{ border:0; } </style>
3. Add the "border:transparent;" style to the td element
by setting the border style to transparent Color to remove
<style> td{ border:transparent; } </style>
(Learning video sharing: html video tutorial, css video tutorial, web front-end)
The above is the detailed content of How to cancel td border in Html5. For more information, please follow other related articles on the PHP Chinese website!