HTMLTableElement: border property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("HTML DOM")}}
The **HTMLTableElement.border** property represents the border width of the {{HtmlElement("table")}} element.
Value
A string representing the width of the border in pixels.
Examples
js
// Set the width of a table border to 2 pixels
const t = document.getElementById("TableA");
t.border = "2";Specifications
{{Specifications}}
Browser compatibility
{{Compat}}