Home > Web Front-end > HTML Tutorial > Tips on setting HTML table borders

Tips on setting HTML table borders

不言
Release: 2018-06-09 15:46:11
Original
2420 people have browsed it

The following is an article about setting tips for HTML table borders. The content is quite good, I would like to share it with you now and give it as a reference

For many people who are new to HTML, table

is the most commonly used tag, but for the control of table borders, Many beginners don’t understand it very well.

Generally when we use a table, we always give it a border attribute, such as:

, the effect is as follows:

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

Generally when we use a table, we always give it a border attribute, such as:
, the effect is as follows:

##However, it seems that the width is still not 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 there is no border between

Caused by overlap. Just modify the border-collapse attribute of the table,

that is,

<table border="1px" cellspacing="0px" >
Copy after login

and then add a color to the table,

<table border="1px" bordercolor="#000000" cellspacing="0px" >
Copy after login

The above is the entire content of this article. I hope it will be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

Make the background image adapt to the browser size in HTML


Detailed example of html word interaction in PHP How to transfer


The above is the detailed content of Tips on setting HTML table borders. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template