When we add borders to table and td tags, double borders are used by default, like this. If we want to merge the borders of table and td, we can set the border-collapse attribute value to collapse in the table style. As shown below: Look at the effect again: To make it easier to replicate, here is the code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> table{ border: 1px solid blue;/*Add border to the table*/ border-collapse: collapse;/*Merge borders*/ } td{ border: 1px solid blue;/*Add border to cell*/ } </style> </head> <body> <table> <tr> <td>1.1</td> <td>1.2</td> </tr> <tr> <td>2.1</td> <td>2.2</td> </tr> </table> </body> </html> This concludes this article about the sample code for html+css merging table borders. For more relevant html merging table borders content, please search 123WORDPRESS.COM’s previous articles or continue browsing the following related articles. I hope you will support 123WORDPRESS.COM in the future! |
<<: Detailed example of locating and optimizing slow query sql in MySQL
>>: About the difference between inspecting elements and viewing the source code of a web page
Preface There is a misunderstanding about the max...
Table of contents Preface Arrow Functions Master ...
1. Resume nacos database Database name nacos_conf...
<iframe src="./ads_top_tian.html" all...
Table of contents Preface 1.notnull 2. unique 3. ...
What is ssh Administrators can log in remotely to...
<body> <div id="root"> <...
This article records the installation tutorial of...
Table of contents Preface InnoDB storage architec...
The reuse of code in vue provides us with mixnis....
Xhtml has many tags that are not commonly used but...
Docker daemon socket The Docker daemon can listen...
Grid is a two-dimensional grid layout system. Wit...
Main library configuration 1. Configure mysql vim...
Table of contents process Demo Mini Program Backe...