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 modify mysql to allow remote connections

Regarding the issue of MySQL remote connection, w...

An example of elegant writing of judgment in JavaScript

Table of contents Preface 1. Monadic Judgment 1.1...

Analysis of the principle and creation method of Mysql temporary table

This article mainly introduces the principle and ...

Detailed explanation of Vue options

Table of contents 1. What are options? 2. What at...

Three ways to draw a heart shape with CSS

Below, we introduce three ways to draw heart shap...

Vuex implements a simple shopping cart

This article example shares the specific code of ...

How to build your own Nexus private server in Linux

This article describes how to build a Nexus priva...

HTML table tag tutorial (31): cell width and height attributes WIDTH, HEIGHT

By default, the width and height of the cell are ...

How to quickly delete all tables in MySQL without deleting the database

This article uses an example to describe how to q...

Understanding Vuex in one article

Table of contents Overview Vuex four major object...

Vue component encapsulates sample code for uploading pictures and videos

First download the dependencies: cnpm i -S vue-uu...

Practical solution for Prometheus container deployment

environment Hostname IP address Serve Prometheus ...

Detailed installation process of nodejs management tool nvm

nvm nvm is responsible for managing multiple vers...

Introduction to fourteen cases of SQL database

Data Sheet /* Navicat SQLite Data Transfer Source...

Detailed explanation of the MySQL MVCC mechanism principle

Table of contents What is MVCC Mysql lock and tra...