MDN self-hosted library · e01.org

HTMLTableElement: rules property

HTML DOM

Open notebook · 1 cells web-api-instance-property upstream source

HTML DOM

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

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

Specifications

Browser compatibility