HtmlTableElement Class

https://html.spec.whatwg.org/multipage/tables.html#htmltableelement

public sealed class HtmlTableElement : HtmlElement
Inheritance
HtmlElement HtmlTableElement

Properties

NameDescription
AlignGets or sets the value of the align content attribute.
BgColorGets or sets the value of the bgcolor content attribute.
BorderGets or sets the value of the border content attribute.
Captionhttps://html.spec.whatwg.org/multipage/tables.html#dom-table-caption
CellPaddingGets or sets the value of the cellpadding content attribute.
CellSpacingGets or sets the value of the cellspacing content attribute.
FrameGets or sets the value of the frame content attribute.
Rowshttps://html.spec.whatwg.org/multipage/tables.html#dom-table-rows: the rows of the thead elements, then the rows that are children of the table or of its tbody elements, then the rows of the tfoot elements.
RulesGets or sets the value of the rules content attribute.
SummaryGets or sets the value of the summary content attribute.
TBodiesGets the live collection of the tbody children of the table.
TFoothttps://html.spec.whatwg.org/multipage/tables.html#dom-table-tfoot
THeadhttps://html.spec.whatwg.org/multipage/tables.html#dom-table-thead
WidthGets or sets the value of the width content attribute.

Gets or sets the value of the align content attribute.

public string Align { get; set; }

Gets or sets the value of the bgcolor content attribute.

public string BgColor { get; set; }

Gets or sets the value of the border content attribute.

public string Border { get; set; }

Caption

Tables.cs

https://html.spec.whatwg.org/multipage/tables.html#dom-table-caption

public HtmlTableCaptionElement? Caption { get; set; }

Gets or sets the value of the cellpadding content attribute.

public string CellPadding { get; set; }

Gets or sets the value of the cellspacing content attribute.

public string CellSpacing { get; set; }

Gets or sets the value of the frame content attribute.

public string Frame { get; set; }

https://html.spec.whatwg.org/multipage/tables.html#dom-table-rows: the rows of the thead elements, then the rows that are children of the table or of its tbody elements, then the rows of the tfoot elements.

public HtmlCollection Rows { get; }

Gets or sets the value of the rules content attribute.

public string Rules { get; set; }

Gets or sets the value of the summary content attribute.

public string Summary { get; set; }

TBodies

Tables.cs

Gets the live collection of the tbody children of the table.

public HtmlCollection TBodies { get; }

https://html.spec.whatwg.org/multipage/tables.html#dom-table-tfoot

public HtmlTableSectionElement? TFoot { get; set; }

https://html.spec.whatwg.org/multipage/tables.html#dom-table-thead

public HtmlTableSectionElement? THead { get; set; }

Gets or sets the value of the width content attribute.

public string Width { get; set; }

Methods

NameDescription
CreateCaption()Returns the caption element of the table, creating and inserting it when there is none.
CreateTBody()https://html.spec.whatwg.org/multipage/tables.html#dom-table-createtbody
CreateTFoot()Returns the tfoot element of the table, creating and inserting it when there is none.
CreateTHead()Returns the thead element of the table, creating and inserting it when there is none.
DeleteCaption()Removes the first caption child of the table, if any.
DeleteRow(int)https://html.spec.whatwg.org/multipage/tables.html#dom-table-deleterow
DeleteTFoot()Removes the first tfoot child of the table, if any.
DeleteTHead()Removes the first thead child of the table, if any.
InsertRow(int)https://html.spec.whatwg.org/multipage/tables.html#dom-table-insertrow

CreateCaption()

Tables.cs

Returns the caption element of the table, creating and inserting it when there is none.

public HtmlTableCaptionElement CreateCaption()

CreateTBody()

Tables.cs

https://html.spec.whatwg.org/multipage/tables.html#dom-table-createtbody

public HtmlTableSectionElement CreateTBody()

CreateTFoot()

Tables.cs

Returns the tfoot element of the table, creating and inserting it when there is none.

public HtmlTableSectionElement CreateTFoot()

CreateTHead()

Tables.cs

Returns the thead element of the table, creating and inserting it when there is none.

public HtmlTableSectionElement CreateTHead()

DeleteCaption()

Tables.cs

Removes the first caption child of the table, if any.

public void DeleteCaption()

DeleteRow(int)

Tables.cs

https://html.spec.whatwg.org/multipage/tables.html#dom-table-deleterow

public void DeleteRow(int index)

DeleteTFoot()

Tables.cs

Removes the first tfoot child of the table, if any.

public void DeleteTFoot()

DeleteTHead()

Tables.cs

Removes the first thead child of the table, if any.

public void DeleteTHead()

InsertRow(int)

Tables.cs

https://html.spec.whatwg.org/multipage/tables.html#dom-table-insertrow

public HtmlTableRowElement InsertRow(int index = -1)