Back to Content

HTMLTableElement: align property

files/en-us/web/api/htmltableelement/align/index.md

latest401 B
Original Source

{{APIRef("HTML DOM")}}{{Deprecated_Header}}

The HTMLTableElement.align property represents the alignment of the table.

Value

One of the following string values:

  • left
  • center
  • right

Examples

js
// Set the alignment of a table
const t = document.getElementById("TableA");
t.align = "center";

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}