--- title: HTMLTableCellElement slug: Web/API/HTMLTableCellElement translation_of: Web/API/HTMLTableCellElement ---
Интерфейс HTMLTableCellElement
содержит специальные свойства и методы (beyond the regular {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating the layout and presentation of table cells, either header or data cells, in an HTML document.
Inherits properties from its parent, {{domxref("HTMLElement")}}.
unsigned
long
that represents the number of columns this cell must span. It reflects the {{htmlattrxref("colspan", "td")}} attribute.unsigned
long
that represents the number of rows this cell must span. It reflects the {{htmlattrxref("rowspan", "td")}} attribute.id
of {{HTMLElement("th")}} elements that represents headers associated with the cell. It reflects the {{htmlattrxref("headers", "td")}} attribute.long
representing the cell position in the cells collection of the {{HTMLElement("tr")}} it belongs to. If the cell doesn't belong to a <tr>
, it returns -1
."left"
, "right"
, and "center"
.'.'
for English, or ','
for French. This property was optional and was not very well supported.HTMLTableCellElement.ch
. This property was optional and was not very well supported."top"
, "middle"
, "bottom"
, or "baseline"
.No specific method; inherits methods from its parent, {{domxref("HTMLElement")}}.
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "tabular-data.html#htmltablecellelement", "HTMLTableCellElement")}} | {{Spec2('HTML WHATWG')}} | No change from {{SpecName("HTML5 W3C")}}. |
{{SpecName('HTML5 W3C', "tabular-data.html#htmltablecellelement", "HTMLTableCellElement")}} | {{Spec2('HTML5 W3C')}} | The following properties have been obsoleted: align , axis , bgColor , height , width , ch , chOff , noWrap , and vAlign .The headers property is now read-only and contains a {{domxref("DOMSettableTokenList")}} rather than a mere {{domxref("DOMString")}}.The colspan and rowspan properties are now unsigned long . |
{{SpecName('DOM2 HTML', 'html.html#ID-82915075', 'HTMLTableCellElement')}} | {{Spec2('DOM2 HTML')}} | The cellIndex property is now read-only. |
{{SpecName('DOM1', 'level-one-html.html#ID-82915075', 'HTMLTableCellElement')}} | {{Spec2('DOM1')}} | Initial definition. |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoDesktop(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
ch and chOff |
{{CompatUnknown}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
ch and chOff |
{{CompatUnknown}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |