W3Schools
w3schools.com › html › html_table_borders.asp
HTML Table Borders
Skip the border around the table by leaving out table from the css selector: th, td { border: 1px solid black; border-radius: 10px; } Try it Yourself » · With the border-style property, you can set the appearance of the border.
Videos
Screenstepslive
utah.screenstepslive.com › a › 1864861-table-borders-and-shading
Table Borders and Shading | Advanced HTML Elements | University of Utah
<table style="border: 1px solid; max-width: 100%; min-width: 40%; margin: 1.5rem auto; float: right;"> <caption>Table with Shaded Column</caption> <colgroup> <col style="border: 1px solid;" /> <col style="border: 1px solid;" /> <col style="border: 1px solid; background-color: #708E99;" /> ...
W3Schools
w3schools.com › css › css_table.asp
CSS Styling Tables
The CSS border property is used to specify the width, style, and color of table borders. ... Notice that the tables in the examples above have double borders. This is because both the <table>, <th>, and <td> elements have separate borders.
HTML AM
html.am › html-codes › tables › table-border.cfm
Table Border
If you want to change the way your table border looks, you can use CSS. CSS allows you to change the color, width, and style of your table borders.
W3C
w3.org › Style › Tables › examples.html
Examples of table borders and rules
table { border: thin dropshadow(thick) } td { border: thin dotted } #G { border: thin dropshadow(thick) override } Cell G is assumed to have an ID `G'. The keyword `override' is used to make sure the cell's border style is honoured. If drop shadows are always `stronger' than dots, this keyword can be omitted. The color difference between the border and the cell is a problem. It can be solved in several ways: (1) in HTML, by putting the cell content inside another element, such as a P or DIV and putting a background on that, or (2) introducing a border-background property, or (3) specyfing that the table background is used for the border background.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › table
<table>: The Table element - HTML | MDN
Notice, however, that we're using the :nth-of-type selector to apply the border-bottom property to the second row in the head. Why? Because the head is made of two rows that are spanned by some of the cells. That means there are actually two rows there; applying the style to the first row would ...
DhiWise
dhiwise.com › post › the-ultimate-guide-to-html-table-border-styling
Elevate Your Website with Modern HTML Table Border Styling
June 4, 2024 - To avoid double borders or to style the last cell of a row differently, you can use the :last-child pseudo-class to target the last table cell in each row. ... Combining background colors with appropriate padding can make the borders stand out and improve the readability of the table content. ... To create a distinct border around the table, you can apply a border to the <table> element itself, setting it apart from the rest of the page content. ... Mastering HTML table borders involves a combination of HTML attributes and CSS properties.
Quackit
quackit.com › html › codes › tables › html_table_border.cfm
HTML Table Border
HTML table borders are specified using Cascading Style Sheets (CSS).
W3Schools
w3schools.com › html › tryit.asp
W3Schools online HTML editor
The W3Schools online code editor allows you to edit code and view the result in your browser
ETSU Faculty
faculty.etsu.edu › tarnoff › ntes1710 › tables › tables.htm
HTML Table Basics
All of these attributes must be ... can be edited by width and color. To change the width of the table's border, use the attribute border="p" where p = number of pixels wide the border should be....
Top answer 1 of 3
3
You need to apply border to cells (TD) instead of table
TD,TH {
border:1px solid black;
}
<!doctype html>
<html>
<body style="font-family:Arial;">
<table style="font-family:Arial; font-size:12px;">
<tr>
<th align="left">Initiative</th>
<th align="left">Scheduled Finish</th>
</tr>
<tr>
<td align="left">[Initiative Name]</td>
<td align="left">[Initiative Scheduled Finish Date]</td>
</tr>
</table>
</body>
</html>
2 of 3
2
Safest way is giving your table a class. This way it won't affect any other tables in your page.
.my-table-border th,
.my-table-border td {
border: 1px solid black
}
<!doctype html>
<html>
<body style="font-family:Arial;">
<table class="my-table-border" style="font-family:Arial; font-size:12px; border:1px solid black;">
<tr style="outline: thin solid">
<th align="left">Initiative</th>
<th align="left">Scheduled Finish</th>
</tr>
<tr style="outline: thin solid">
<td align="left">[Initiative Name]</td>
<td align="left">[Initiative Scheduled Finish Date]</td>
</tr>
</table>
</body>
</html>
The table class is my-table-border and the selector is only picking tds and ths inside of tables that have this class.
HTML Tables
htmltables.io › blog › html-table-borders
HTML Table Borders — A Complete Guide
April 17, 2024 - In this comprehensive guide, we'll dive deep into HTML table borders, exploring the various properties and techniques that you can use to customize and optimize your table designs. From setting border colors and styles to manipulating cell borders and border widths, we'll cover everything you ...
GeeksforGeeks
geeksforgeeks.org › html › html-table-borders
HTML Table Borders - GeeksforGeeks
July 23, 2025 - Example: Illustration of the Style Table border. ... <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML Table border-style</title> <style> body { font-family: Arial, Helvetica, sans-serif; } h1, h3 { text-align: center; color: green; } table { width: 100%; border: 1px solid #100808; border-collapse: collapse; } th, td { text-align: center; border: 1px solid #413434; padding: 10px; background-color: rgb(181, 216, 181); } </style> </head> <body> <h1>GeeksforGeeks</h1> <h3>Table Border Style </h3> <table> <thead> <tr> <th>Name</th> <th>Class</th> <th> Roll No </th> </tr> </thead> <tbody> <tr> <td>Mahima</td> <td>10</td> <td>1</td> </tr> <tr> <td>Krishn</td> <td>8</td> <td>3</td> </tr> <tr> <td>Shivika</td> <td>8</td> <td>5</td> </tr> </tbody> </table> </body> </html>