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

Solution to the MySQL error "Every derived table must have its own alias"

MySQL reports an error when executing multi-table...

Implementation of HTML command line interface

HTML Part Copy code The code is as follows: <!D...

IE6 implements min-width

First of all, we know that this effect should be ...

How to uninstall and reinstall Tomcat (with pictures and text)

Uninstall tomcat9 1. Since the installation of To...

Timeline implementation method based on ccs3

In web projects we often use the timeline control...

How to open port 8080 on Alibaba Cloud ECS server

For security reasons, Alibaba Cloud Server ECS co...

How to implement web stress testing through Apache Bench

1. Introduction to Apache Bench ApacheBench is a ...

Background image cache under IE6

CSS background image flickering bug in IE6 (backg...

Install Python virtual environment in Ubuntu 18.04

For reference only for Python developers using Ub...

What hidden attributes in the form can be submitted with the form

The form elements with visibility=hidden and displ...

Implementation of new issues of CSS3 selectors

Table of contents Basic Selector Extensions Attri...

In-depth explanation of the style feature in Vue3 single-file components

Table of contents style scoped style module State...

Linux parted disk partition implementation steps analysis

Compared with fdisk, parted is less used and is m...