Interface IHtmlTableElement
- Namespace
- AngleSharp.Html.Dom
- Assembly
- AngleSharp.dll
Represents the table HTML element.
[DomName("HTMLTableElement")]
public interface IHtmlTableElement : IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IGlobalEventHandlers
- Inherited Members
- Extension Methods
Properties
Bodies
Gets the assigned body sections.
[DomName("tBodies")]
IHtmlCollection<IHtmlTableSectionElement> Bodies { get; }
Property Value
Border
Gets or sets the border attribute.
[DomName("border")]
uint Border { get; set; }
Property Value
Caption
Gets or sets the assigned caption element.
[DomName("caption")]
IHtmlTableCaptionElement? Caption { get; set; }
Property Value
Foot
Gets or sets the assigned foot section.
[DomName("tFoot")]
IHtmlTableSectionElement? Foot { get; set; }
Property Value
Head
Gets or sets the assigned head section.
[DomName("tHead")]
IHtmlTableSectionElement? Head { get; set; }
Property Value
Rows
Gets the assigned table rows.
[DomName("rows")]
IHtmlCollection<IHtmlTableRowElement> Rows { get; }
Property Value
Methods
CreateBody()
Creates a new table body section.
[DomName("createTBody")]
IHtmlTableSectionElement CreateBody()
Returns
- IHtmlTableSectionElement
A body element.
CreateCaption()
Creates a new table caption object or returns the existing one.
[DomName("createCaption")]
IHtmlTableCaptionElement CreateCaption()
Returns
- IHtmlTableCaptionElement
A caption element.
CreateFoot()
Creates a table footer section or returns an existing one.
[DomName("createTFoot")]
IHtmlTableSectionElement CreateFoot()
Returns
- IHtmlTableSectionElement
A footer element.
CreateHead()
Creates a new table header section or returns the existing one.
[DomName("createTHead")]
IHtmlTableSectionElement CreateHead()
Returns
- IHtmlTableSectionElement
A table header element.
DeleteCaption()
Deletes the table caption, if one exists.
[DomName("deleteCaption")]
void DeleteCaption()
DeleteFoot()
Deletes the footer from the table, if one exists.
[DomName("deleteTFoot")]
void DeleteFoot()
DeleteHead()
Deletes the header from the table, if one exists.
[DomName("deleteTHead")]
void DeleteHead()
InsertRowAt(int)
Inserts a new empty row in the table. The new row is inserted immediately before and in the same section as the current indexth row in the table. If index is -1 or equal to the number of rows, the new row is appended. In addition, when the table is empty the row is inserted into a TBODY which is created and inserted into the table.
[DomName("insertRow")]
IHtmlTableRowElement InsertRowAt(int index = -1)
Parameters
index
intThe row number where to insert a new row. This index starts from 0 and is relative to the logical order (not document order) of all the rows contained inside the table.
Returns
- IHtmlTableRowElement
The inserted table row.
RemoveRowAt(int)
Deletes a table row.
[DomName("deleteRow")]
void RemoveRowAt(int index)
Parameters
index
intThe index of the row to be deleted. This index starts from 0 and is relative to the logical order (not document order) of all the rows contained inside the table. If the index is -1 the last row in the table is deleted.