Home > Web Front-end > CSS Tutorial > How to use css to not display the border of the table

How to use css to not display the border of the table

王林
Release: 2020-11-13 11:25:24
Original
4938 people have browsed it

How to use css to not display the border of the table: You can use the border attribute, such as [border:0;]. The border attribute is used to set all border attributes, such as border-width, which specifies the width of the border.

How to use css to not display the border of the table

#border shorthand property sets all border properties in one declaration.

(Learning video sharing: css video tutorial)

You can set the following attributes in order:

  • border-width

  • border-style

  • border-color

If one of the values ​​is not set, There will be no problem. For example, border:solid #ff0000; is also allowed.

Attribute value:

border-width    规定边框的宽度。
border-style    规定边框的样式。   
border-color    规定边框的颜色。
inherit    规定应该从父元素继承 border 属性的设置。
Copy after login

Code example:

<html>
<head>
</head>

<body>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Bill</td>
<td>Gates</td>
</tr>
<tr>
<td>Steven</td>
<td>Jobs</td>
</tr>
</table>
</body>
</html>
Copy after login

css

<style type="text/css">
table,th,td
{
border:0;
}
</style>
Copy after login

Result:

How to use css to not display the border of the table

Related videos: CSS tutorial

The above is the detailed content of How to use css to not display the border of the table. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template