HTMLTableElement: cellPadding プロパティ
非推奨;: この機能は非推奨になりました。まだ対応しているブラウザーがあるかもしれませんが、すでに関連するウェブ標準から削除されているか、削除の手続き中であるか、互換性のためだけに残されている可能性があります。使用を避け、できれば既存のコードは更新してください。このページの下部にある互換性一覧表を見て判断してください。この機能は突然動作しなくなる可能性があることに注意してください。
HTMLTableElement.cellPadding
プロパティは、表のそれぞれのセルの周囲にあるパディングを表します。
値
文字列で、ピクセル数(例えば "10"
)またはパーセント値(例えば "10%"
)を表します。
null
値に設定するには、その null
値を空文字列 (""
) に変換します。そのため、elt.cellPadding = null
は elt.cellPadding = ""
と同等です。
例
js
// セルのパディングを 10 ピクセルに設定
let t = document.getElementById("TableA");
t.cellPadding = "10";
仕様書
Specification |
---|
HTML # dom-table-cellpadding |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
cellPadding |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Deprecated. Not for use in new websites.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.