Tips on setting HTML table borders

Tips on setting HTML table borders

For many people who are new to HTML, table <table> is the most commonly used tag, but many beginners do not quite understand how to control the table borders.

Generally, when we use a table, we always give it a border attribute, such as: <table border="1">, the effect is as follows:

For many people who are new to HTML, table <table> is the most commonly used tag, but many beginners do not quite understand how to control the table borders.

Generally, when we use a table, we always give it a border attribute, such as: <table border="1">, the effect is as follows:

However, it seems that the width is not as wide as we imagined: only one pixel wide. In fact, what you see in the above picture is actually two pixels wide. Why? This is because the borders between <td> do not overlap. Just modify the border-collapse property of the table.

That is <table border="1px" cellspacing="0px" >

Add a color to the table, <table border="1px" bordercolor="#000000" cellspacing="0px" >

The above tips on setting HTML table borders are all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

<<:  CSS achieves highly adaptive full screen

>>:  Tutorial on installing Ceph distributed storage with yum under Centos7

Recommend

How to deal with garbled characters in Mysql database

In MySQL, database garbled characters can general...

Detailed explanation of Mysql function call optimization

Table of contents Function call optimization Func...

Detailed explanation of how to pass password to ssh/scp command in bash script

Install SSHPASS For most recent operating systems...

Detailed explanation of data type issues in JS array index detection

When I was writing a WeChat applet project, there...

A brief discussion on MySQL B-tree index and index optimization summary

MySQL's MyISAM and InnoDB engines both use B+...

CSS realizes the scene analysis of semi-transparent border and multiple border

Scenario 1: To achieve a semi-transparent border:...

How to use libudev in Linux to get USB device VID and PID

In this article, we will use the libudev library ...

Solution to the problem of insufficient storage resource pool of Docker server

Table of contents 1. Problem Description 2. Probl...

Tutorial on compiling and installing MySQL 5.7.17 from source code on Mac

1. Download and unzip to: /Users/xiechunping/Soft...

vsftpd virtual user based on MySql authentication

Table of contents 1. MySQL installation 1.2 Creat...

Detailed explanation of the process of installing msf on Linux system

Or write down the installation process yourself! ...

How to implement JavaScript output of Fibonacci sequence

Table of contents topic analyze Basic solution Ba...