HTML <table> tag
Updated: 08/02/2020 by Computer Hope
When writing in HTML, the <table> tag is a block element used to create a table. It is useful when you want to represent data using rows and columns. The basic elements that make up and affect the size of a table include <th>, <td>, and <tr>. The following sections contain information about the <table> tag, including an example of it in use, and related attributes and browser compatibility.
Example of <table> code
<table class="mtable2 tab">
We have added a few of our own classes to the table using CSS; this action allows us to improve its appearance.
Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. Every attribute that was unique to the <table> tag is deprecated. While these attributes may work with the some versions of HTML, they will eventually be phased out. You should use CSS to adjust the dimensions and appearance of this element.
||Designates the alignment of content inside an element.
||Designates the background color of a table.
||Designates whether or not cell should have a border.
||Designates how much spacing is between the cell wall and the cell content.
||Designates spacing between cells.
||Designates which parts of the outside borders are visible.
||Designates which parts of the inside borders are visible.
||Designates that a table is sortable.
||Designates what the contents of the table are.
||Designates how wide the table should be.
Browser, Cell, Class, Column, Compatibility, Container tag, Format, Row, Table, Web design terms