Back to Content

HTMLTableElement: rules property

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

latest558 B
Original Source

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

The HTMLTableElement.rules property indicates which cell borders to render in the table.

Value

One of the following:

  • none
    • : No rules
  • groups
    • : Lines between groups only
  • rows
    • : Lines between rows
  • cols
    • : Lines between cols
  • all
    • : Lines between all cells

Examples

js
// Turn on all the internal borders of a table
const t = document.getElementById("TableID");
t.rules = "all";

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}