Attribute of
<table>
What does <table background=""> do?
Was used to specify the URL of an image to be set as the background for an HTML table. This element has been deprecated. Use CSS to style HTML tables.

Code Example

<table background="/wp-content/uploads/wov.png">
  <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>
  <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>
  <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>
</table>
First columnSecond columnThird column
First columnSecond columnThird column
First columnSecond columnThird column

Adding a Background Image to a Table

The background attribute was used to specify a URL where an image file could be found. The browser would use that image as a background image for the table element to which the background attribute had been applied.

This attribute has been deprecated in favor of styling tables with CSS.

To apply a background image with CSS, use the background property.

<style>
table.example-table {
  background: url("/wp-content/uploads/wov.png");
  /* image courtesy of subtlepatterns.com */
}
</style>
<table class="example-table">
  <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>
  <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>
  <tr><td>First column</td><td>Second column</td><td>Third column</td></tr>
</table>

Here's how the browser interprets that bit of code.

First column Second column Third column
First column Second column Third column
First column Second column Third column