HTML + CSS merge table border example code


When we add borders to table and TD tags, we use double borders 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:


In order to facilitate copying, the code is given here:

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
            border: 1px solid blue;/* Add border to table*/
            border-collapse: collapse;/* Merge border*/
            border: 1px solid blue;/* Add borders to cells*/

This is the end of this article about the sample code of HTML + CSS merged table border. For more information about html merged table border, please search the previous articles of developeppaer or continue to browse the relevant articles below. I hope you will support developeppaer in the future!