How to set the outer border of the table to be bold in css

WBOY
Release: 2021-11-19 18:12:37
Original
8686 people have browsed it

In CSS, you can use the border attribute to set the outer border of the table to be bold. You only need to add the "border: border width solid border color value;" style to the table element. The greater the border width value, the outer border will be thicker. The thicker the border.

How to set the outer border of the table to be bold in css

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

How to set the outer border of the table to be bold in css

You can use the border attribute to set the width of the outer border of the table. The border abbreviation attribute is in a statement Set all border properties.

The sample code is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <style type="text/css">
    .mytable{
        width:400px;
        height:150px;
        border:10px solid #000;
    }
    </style>
    <table border="1" class="mytable">
        <tr><td>aaa</td><td>bbb</td></tr>
        <tr><td>ccc</td><td>ddd</td></tr>
</table>
</body>
</html>
Copy after login

Output result:

How to set the outer border of the table to be bold in css

##(Learning video sharing:

css video tutorial)

The above is the detailed content of How to set the outer border of the table to be bold in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
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