Home  >  Article  >  Web Front-end  >  What properties are used to set CSS table borders?

What properties are used to set CSS table borders?

(*-*)浩
(*-*)浩Original
2019-11-28 14:29:395117browse

What properties are used to set CSS table borders?

Table border

If you need to set the table border in CSS, please use the border attribute. (Recommended learning: CSS Introduction Tutorial)

The following example sets blue borders for table, th and td:







Firstname Lastname
Bill Gates
Steven Jobs

Note that the table in the example above has a double line border. This is because the table, th and td elements have independent borders.

If you need to display the table as a single line border, please use the border-collapse attribute.

The above is the detailed content of What properties are used to set CSS table borders?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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