HTMLTableElement: cellPadding プロパティ
Deprecated
Avoid using this feature in new projects. Some table styling attributes have no effect. They are superseded by CSS. This feature may be a candidate for removal from web standards or browsers.>
HTMLTableElement.cellPadding プロパティは、表のそれぞれのセルの周囲にあるパディングを表します。
値
文字列で、ピクセル数(例えば "10")またはパーセント値(例えば "10%")を表します。
null 値に設定するには、その null 値を空文字列 ("") に変換します。そのため、elt.cellPadding = null は elt.cellPadding = "" と同等です。
例
js
// セルのパディングを 10 ピクセルに設定
let t = document.getElementById("TableA");
t.cellPadding = "10";
仕様書
| 仕様書 |
|---|
| HTML> # dom-table-cellpadding> |