Using a double border for a html table while having single solid border around cells

html table outer border no inner border
how to remove double border in html table
html table cell border
html table no border between cells
html table vertical line between columns
html table border-collapse
html table double border
html table border style

How can I make a table with a double border around the table, but single solid border around the cells?

table {
  border-collapse: collapse;
  border: 2px double black;
}

td {
  border: 1px solid black;
  margin: 0;
  padding: 5px;
}

th {
  background-color: #999;
  padding: 0;
  margin: 0;
}

tr {
  padding: 0;
}
<h1>Section 1</h1>
<h2>1.1 Subheading</h2>
<table>
  <tr>
    <th>A</th>
    <th>B</th>
    <th>C</th>
  </tr>
  <tr>
    <td>This is my content for box 1</td>
    <td>Some other content</td>
    <td>Here is my wonderful html table with long content that I have no idea how it will look until I see it</td>
  </tr>
  <tr>
    <td>twinkle twinkle</td>
    <td>little star</td>
    <td>Yao Ming</td>
  </tr>

</table>

If you want to have double borders, You can try this,

HTML

<table class="borders">....</table>

CSS

 .borders {
  position: relative;
  border: 1px solid black;
}
  .borders:before {
  content: " ";
  position: absolute;
  z-index: -1;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  border: 1px solid black;
}

How to Add Border to HTML Table, How do you put a border on a TD table in HTML? Creating a border for the HTML table¶ After creating an HTML table, you should add a border to it, as borders are not added by default. First, let’s see an example, where we use the HTML border attribute. Example of creating an HTML table with the border attribute:

You can do this by wrapping the table in a div element and setting border to the div element. You must make it display: inline-block and width: auto so it doesn't take full width and float just around the table.

table {
  border-collapse: collapse;
  border: 2px double black;
}

td {
  border: 1px solid black;
  margin: 0;
  padding: 5px;
}

th {
  background-color: #999;
  padding: 0;
  margin: 0;
}

tr {
  padding: 0;
}

.table-wrapper {
    display: inline-block;
    width: auto;
    padding: 5px; 
    border: 1px solid black;
}
<h1>Section 1</h1>
<h2>1.1 Subheading</h2>
<div class="table-wrapper">
  <table>
    <tr>
      <th>A</th>
      <th>B</th>
      <th>C</th>
    </tr>
    <tr>
      <td>This is my content for box 1</td>
      <td>Some other content</td>
      <td>Here is my wonderful html table with long content that I have no idea how it will look until I see it</td>
    </tr>
    <tr>
      <td>twinkle twinkle</td>
      <td>little star</td>
      <td>Yao Ming</td>
    </tr>

  </table>
</div>

Add border-bottom to table row <tr>, How do I add a border to the bottom of a row in a table? This page contains HTML table border code - HTML codes for specifying or changing the border of your tables within your blog or web page. HTML table borders are specified using Cascading Style Sheets . To set the border of an HTML table, use the CSS border property. Typical Table Border. Here's a common way to set borders on a table:

You can consider outline:

table {
  border-collapse: collapse;
  border: 2px double black;
  outline:2px solid red;
}

td {
  border: 1px solid black;
  margin: 0;
  padding: 5px;
}

th {
  background-color: #999;
  padding: 0;
  margin: 0;
}

tr {
  padding: 0;
}
<h1>Section 1</h1>
<h2>1.1 Subheading</h2>
<table>
  <tr>
    <th>A</th>
    <th>B</th>
    <th>C</th>
  </tr>
  <tr>
    <td>This is my content for box 1</td>
    <td>Some other content</td>
    <td>Here is my wonderful html table with long content that I have no idea how it will look until I see it</td>
  </tr>
  <tr>
    <td>twinkle twinkle</td>
    <td>little star</td>
    <td>Yao Ming</td>
  </tr>

</table>

HTML, Which attributes is used to control the inside table border? Understood, I needed that too. Enclose the set of rows you want a border around in their own tbody, and the above css will create a border around the set of them -- i.e., a top border on the top row, a bottom border on the bottom row, and left and right borders on all rows in the tbody.

Examples of table borders and rules, table { border-top: double; border-bottom: double; border-right: blank } thead, tbody, tfoot A table with only vertical rules between the columns. prevent cell border */ } colgroup { border-right: solid thick } thead td { border: solid } tbody td { border: Instead of border on TR, one could have set top and bottom on each cell. A dotted border. A dashed border. A solid border. A double border. A groove border. The effect depends on the border-color value. A ridge border. The effect depends on the border-color value. An inset border. The effect depends on the border-color value. An outset border. The effect depends on the border-color value. No border. A hidden border

Towards a model for table borders and rules, The double, groove and ridge types, with three parts each, are the most complex. In the HTML table model, there are 7 types of objects: table (table), row group One way of achieving this is to set the border on the cell, but with a condition are only defined (and thus drawn) when the edge coincides with a cell's edge. Anyway, the approach was to make the border-style doubleinstead of solid. This works because double has a higher priority than solid. On 1px or 2px borders, the gap between the double lines doesn't appear because the lines overlap. table { border-collapse: collapse; }td { border: 2px solid Gray; }td.special { border: 2px double Red; }

A Table With Borders Only On The Inside, I was just pondering how to do this the other day, as one does. Add a border everywhere, then remove the border on the: The top of every cell in the first row; The bottom of every cell in the last table { border-collapse: collapse; } table td { border: 5px solid black; } table { border: 5px double transparent; }. Specifies whether or not table borders should be collapsed: border-spacing: Specifies the distance between the borders of adjacent cells: caption-side: Specifies the placement of a table caption: empty-cells: Specifies whether or not to display borders and background on empty cells in a table: table-layout: Sets the layout algorithm to be used