Found 2202 Articles for HTML

HTML DOM TableRow Object

AmitDiwan
Updated on 20-Sep-2019 10:39:14

110 Views

The HTML DOM TableRow Object represent the element of an HTML document.Create TableRow objectSyntaxFollowing is the syntax −document.createElement(“TR”);Properties of TableRow objectPropertyExplanationrowIndexIt returns the position of a row in the rows collection of a table.sectionRowIndexIt returns the position of a row in the rows collection of a thead, tbody, or tfoot.Methods of TableRow objectMethodExplanationdeleteCell()It removes a cell from the current table row.insertCell()It adds a cell into the current table row.Let us see an example of TableRow object:Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;     ... Read More

HTML DOM TableHeader Object

AmitDiwan
Updated on 20-Sep-2019 10:32:21

98 Views

The HTML DOM TableHeader Object represent the element of an HTML document.Create TableHeader objectSyntaxFollowing is the syntax −document.createElement(“TH”);Properties of TableHeader objectPropertyExplanationcellIndexIt returns the position of a cell in the cell collection of a table row.colSpanIt returns and alter the value of colspan attribute of a table.headersIt returns and alter the value of headers attribute of a table.abbrIt returns and alter the value of abbr attribute of a table.rowSpanIt returns and alter the value of rowspan attribute of a tableLet us see an example of TableHeader object:Example Live Demo    body {       color: #000;     ... Read More

HTML DOM TableData Object

AmitDiwan
Updated on 20-Sep-2019 10:25:05

109 Views

The HTML DOM TableData Object represent the element of an HTML document.Create TableData objectSyntaxFollowing is the syntax −document.createElement(“TD”);Properties of TableData objectPropertyExplanationcellIndexIt returns the position of a cell in the cell collection of a table row.colSpanIt returns and alter the value of colspan attribute of a table.headersIt returns and alter the value of headers attribute of a table.rowSpanIt returns and alter the value of rowspan attribute of a table.Let us see an example of TableData object −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;     ... Read More

HTML DOM TableData rowSpan Property

AmitDiwan
Updated on 20-Sep-2019 09:20:52

213 Views

The HTML DOM TableData rowSpan property returns and modify the value of rowspan attribute of a table in an HTML document.SyntaxFollowing is the syntax −1. Returning rowSpanobject.rowSpan2. Adding rowSpanobject.rowSpan = “number”Let us see an example of rowSpan property −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;       width: 400px;    }    .btn {       background: #db133a;       border: none;       height: ... Read More

HTML DOM TableData headers Property

AmitDiwan
Updated on 20-Jun-2020 08:32:54

90 Views

The HTML DOM TableData headers property returns and modify the value of headers attribute of a table in an HTML document.SyntaxFollowing is the syntax −1. Returning headersobject.headers2. Adding colspanobject.headers = “headers_ids”Let us see an example of headers property −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;       width: 400px;    }    .btn {       background: #db133a;       border: none;       height: ... Read More

HTML DOM TableData colSpan Property

AmitDiwan
Updated on 20-Jun-2020 08:31:54

187 Views

The HTML DOM TableData colSpan property returns and modify the value of colspan attribute of a table in an HTML document.SyntaxFollowing is the syntax −1. Returning colSpanobject.colSpan2. Adding colSpanobject.colSpan = “number”Let us see an example of colSpan property −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;       width: 400px;    }    .btn {       background: #db133a;       border: none;       height: ... Read More

HTML DOM Table tHead Property

AmitDiwan
Updated on 20-Sep-2019 09:10:08

136 Views

The HTML DOM table tHead property returns the element of the table in an HTML document.SyntaxFollowing is the syntax −object.tHeadLet us see an example of HTML DOM table tHead property −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;    }    caption {       color: #db133a;    }    .btn {       background: #db133a;       border: none;       height: 2rem;   ... Read More

HTML DOM Table tFoot Property

AmitDiwan
Updated on 20-Sep-2019 09:06:28

93 Views

The HTML DOM table tFoot property returns the element of the table in an HTML document.SyntaxFollowing is the syntax −object.tFootLet us see an example of HTML DOM table tFoot property −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%;   ... Read More

HTML DOM Table tBodies Collection

AmitDiwan
Updated on 20-Sep-2019 09:02:27

152 Views

The HTML DOM table tBodies Collection returns a collection of all elements in a table in an HTML document.SyntaxFollowing is the syntax −object.tBodiesProperties of tBodies CollectionPropertyExplanationlengthIt returns the number of elements in the collection in an HTML documentProperties of tBodies CollectionMethodExplanation[index]It returns the specified index element from the collection.item(index)It returns the specified index element from the collection.namedItem(id)It returns the specified id element from the collection.Let us see an example of HTML DOM table tBodies Collection −Example Live Demo    body {       color: #000;       background: lightblue;       ... Read More

HTML DOM Table rows Collection

AmitDiwan
Updated on 20-Sep-2019 08:55:43

357 Views

The HTML DOM table rows Collection returns a collection of all elements of a table in an HTML document.SyntaxFollowing is the syntax −object.rowsProperties of rows Collectionelements in the collection in an HTML document.PropertyExplanationlengthIt returns the number of elements in the collection in an HTML document.Methods of rows Collectionelement from the collection element from the collection. element from the collectionMethodExplanation[index]It returns the specified index element from the collection.item(index) It returns the specified index element from the collection.namedItem(id)It returns the specified id element from the collectionLet us see an example of HTML DOM table rows Collection −Example Live ... Read More

Advertisements