<style type="text/css">
    table {
        border-collapse: collapse;
    }
    #one td {
        border: 1px solid #ff0000; 
    }
</style>

<table>
    <tr id="one">
        <td></td>
        <td></td>
    </tr>
    <tr id="two">
        <td></td>
        <td></td>
    </tr>
</table>
Answer from Ravi Chauhan on Stack Overflow
🌐
W3Schools
w3schools.com › html › html_table_borders.asp
HTML Table Borders
To avoid having double borders like in the example above, set the CSS border-collapse property to collapse. This will make the borders collapse into a single border: table, th, td { border: 1px solid black; border-collapse: collapse; } Try it Yourself » · If you set a background color of each cell, and give the border a white color (the same as the document background), you get the impression of an invisible border:
Discussions

html - border-color change in table cells - Stack Overflow
With border-collapse set to collapse, the solution would be to use an inset border for all the cells, and a solid border for the cell that the mouse hovers over. Here's the suggested CSS in action: http://jsfiddle.net/QmHGG/ The following is the CSS that was applied to the table: More on stackoverflow.com
🌐 stackoverflow.com
Using CSS to make table's outer border color different from cells' border color - Stack Overflow
I want to use CSS to set a color of the outer border of the table ... Then the inner cells would have different border color ... I created something like this : table { border-collapse:colla... More on stackoverflow.com
🌐 stackoverflow.com
how can i change color of vertical and horizontal border on a table in css?
This will do it: https://codepen.io/NeilSchulz/pen/gOoXRpj (Notes in HTML and CSS explaining steps) More on reddit.com
🌐 r/csshelp
3
1
April 2, 2022
Override Table border
https://jsfiddle.net/zee1aLsj/4/ your "table .noborder" is targeting an element with a class of noborder inside of a table, that's why the border remains on the table element. Change to just .noborder or table.noborder (if you need to be more specific for some reason) and it works. More on reddit.com
🌐 r/css
4
1
February 12, 2015
🌐
HTML Tables
htmltables.io › blog › html-table-borders
HTML Table Borders — A Complete Guide
April 17, 2024 - In HTML, you can set the border color using a variety of methods, including hexadecimal color codes, named colors, and even RGB or HSL values. Hexadecimal color codes, such as #FF0000 for red or #00FFFF for cyan, offer precise control over the ...
🌐
Screenstepslive
utah.screenstepslive.com › a › 1864861-table-borders-and-shading
Table Borders and Shading | Advanced HTML Elements | University of Utah
Select an individual cell to use the general table properties menu to shade an individual cell or, in code, add a style to the td tag to specify the background color for a specific cell. <table style="border-collapse: collapse; width: auto; margin-left: auto; margin-right: auto;" border="1" ...
🌐
Wrox
p2p.wrox.com › css-cascading-style-sheets › 38951-change-border-color-every-cell-table.html
Change border color for every cell of a table
Hi all, I want to change the border color of every cells or rows of a table but I am not quite sure what is the best way to do it. Personally, I want
🌐
Ironspider
ironspider.ca › tables › tablecolor.htm
Background and Border Color
Gecko-based browsers, such as Firefox, ... bottom and right sides. bordercolorlight="color definition*" ~ The bordercolorlight attribute can be used to define the border color on the top and left sides of your table....
🌐
HTML AM
html.am › html-codes › tables › table-border.cfm
Table Border
I've also applied a different colored border around the table (as I did in the previous example). The different color will help distinguish between the table border and the cell borders: You can remove the space between the different borders by using the CSS border-collapse property.
Find elsewhere
🌐
wpDataTables
wpdatatables.com › home › blog › html table borders: the complete guide to creating, styling, and customizing
HTML Table Borders: The Complete Guide to Creating, Styling, and Customizing
December 15, 2025 - Borders (inner cell borders, outer table borders, or even removing them). Row colors (alternate row backgrounds, hover color). Table pagination style and colors. Custom CSS (if you want to add your own tweaks).
🌐
PureCode AI
blogs.purecode.ai › home › guide to css table border: make data easily readable
Guide to CSS Table Border: Make Data Easily Readable - Blogs
September 7, 2025 - Here, every cell in the table will have a 1-pixel solid navy border. The border property in CSS is a shorthand that combines border-width, border-style, and border-color.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Reference › Properties › border-color
border-color - CSS - MDN Web Docs - Mozilla
#example-element { background-color: #eeeeee; color: black; border: 0.75em solid; padding: 0.75em; width: 80%; height: 100px; } This property is a shorthand for the following CSS properties:
🌐
W3Schools
w3schools.com › css › css_border_color.asp
CSS Border Color
CSS Reference CSS Selectors CSS ... Color Values CSS Default Values CSS Browser Support ... The border-color property is used to set the color of the four borders....
🌐
ETSU Faculty
faculty.etsu.edu › TARNOFF › ntes1710 › tables › tables.htm
HTML Table Basics
The table below has the bordercolor set to #ff00ff with the table tag <table bordercolor="#ff00ff">. To change the background color, use the attribute bgcolor="color".
🌐
GeeksforGeeks
geeksforgeeks.org › html › html-table-border-attribute
HTML table border Attribute - GeeksforGeeks
July 11, 2025 - The table is given a 1-pixel border using the border="1" attribute, and it contains 3 columns: NAME, AGE, and BRANCH. The table's dimensions are set using height and width as percentages of the viewport, making it responsive.
🌐
EITCA
eitca.org › home › how can you add borders to a table using css?
How can you add borders to a table using CSS? - EITCA Academy
August 7, 2023 - For instance, to set a 2 pixel wide border for the table cells, you can use the following CSS rule: ... 5. Customizing Border Colors: To change the color of the table and cell borders, you can use the "border-color" property. This property accepts color values in various formats, including ...
🌐
Scientech Easy
scientecheasy.com › home › blog › html table borders
HTML Table Borders - Scientech Easy
February 17, 2026 - We can apply this CSS property to the <td> and <th> elements to change the background color of individual cells or entire rows/columns within the table. We can also apply it to the <tr> element to set the background color for an entire row at once.
🌐
HTML.com
html.com › attributes › table-bordercolor
What Does HTML Bordercolor Attribute Does To Your Tables? [Clue: Color!] »
December 20, 2019 - First, we’ll look at setting the borders to a single color. Next, we’ll look at setting the light and dark shades of the border. The color of the table borders as a whole is set with the BORDERCOLOR attribute of the <TABLE> tag.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Reference › Properties › border-collapse
border-collapse - CSS - MDN Web Docs - Mozilla
.collapse { border-collapse: collapse; } .separate { border-collapse: separate; } table { display: inline-table; margin: 1em; border: dashed 5px; } table th, table td { border: solid 3px; } .fx { border-color: orange blue; } .gk { border-color: black red; } .ed { border-color: blue gold; } .tr { border-color: aqua; } .sa { border-color: silver blue; } .wk { border-color: gold blue; } .ch { border-color: red yellow green blue; } .bk { border-color: navy blue teal aqua; } .op { border-color: red; }