HTML Articles

Page 18 of 151

HTML isTrusted Event Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 184 Views

The isTrusted event property is a read-only boolean property that indicates whether an event was triggered by a user action or programmatically by a script. This property is crucial for security purposes, allowing developers to distinguish between genuine user interactions and automated script-generated events. When an event is triggered by genuine user actions like clicks, keystrokes, or mouse movements, the isTrusted property returns true. However, when the same event is generated programmatically using JavaScript methods like click(), dispatchEvent(), or similar functions, it returns false. Syntax Following is the syntax to access the isTrusted property from an event ...

Read More

HTML DOM Table caption Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 204 Views

The HTML DOM table caption property is used to get or set the caption of an HTML table element. The caption provides a title or description for the table content and is typically displayed above the table. Syntax Following is the syntax for getting the caption property − tableObject.caption Following is the syntax for setting the caption property − tableObject.caption = captionObject Property Values The caption property accepts the following values − captionObject − A reference to the caption element object, or null if no caption exists. ...

Read More

HTML DOM Table insertRow() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 290 Views

The HTML DOM table insertRow() method creates an empty element and inserts it at a specified position in a table. This method is useful for dynamically adding rows to existing tables without rebuilding the entire table structure. Syntax Following is the syntax for the insertRow() method − table.insertRow(index) Parameters The insertRow() method accepts the following parameter − index (optional) − A number specifying the position where the new row should be inserted. If omitted or set to -1, the row is appended at the end of the table. ...

Read More

HTML DOM Table deleteRow() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 177 Views

The HTML DOM table deleteRow() method removes a specific row ( element) from a table. This method is useful for dynamically managing table content in web applications. Syntax Following is the syntax for the deleteRow() method − table.deleteRow(index) Parameters The method accepts one parameter − index − An integer that specifies the position of the row to delete. The index starts from 0. If the index is -1, it deletes the last row. If the index is out of range, an error occurs. Return Value This ...

Read More

HTML DOM Table rows Collection

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 427 Views

The HTML DOM Table rows Collection returns a collection of all elements in a table. This collection provides access to table rows for manipulation, counting, and retrieval operations using JavaScript. Syntax Following is the syntax to access the rows collection − tableObject.rows Where tableObject is a reference to a element obtained through methods like document.getElementById() or document.querySelector(). Properties of rows Collection The rows collection provides the following property to get information about the table rows − Property Description length Returns the number ...

Read More

HTML DOM Table tBodies Collection

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 210 Views

The HTML DOM table tBodies Collection returns a collection of all elements within a specific table element. This collection is live, meaning it automatically updates when elements are added or removed from the table. Syntax Following is the syntax to access the tBodies collection − tableObject.tBodies Where tableObject is a reference to an HTML table element obtained through methods like document.getElementById() or document.querySelector(). Properties The tBodies collection has the following property − Property Description length Returns the number of elements in ...

Read More

HTML DOM Table tHead Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 178 Views

The HTML DOM table tHead property returns the element of a table. This property provides access to the table's header section, allowing developers to manipulate or retrieve the header content programmatically. Syntax Following is the syntax for accessing the tHead property − table.tHead Return Value The tHead property returns − A HTMLTableSectionElement representing the element if it exists. null if the table has no element. Example − Accessing Table Header Following example demonstrates how to use the tHead property to access ...

Read More

HTML DOM TableData colSpan Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 235 Views

The HTML DOM TableData colSpan property returns and modifies the value of the colspan attribute of a table cell ( or ) in an HTML document. This property controls how many columns a cell spans across in a table. Syntax Following is the syntax for returning the colSpan property − object.colSpan Following is the syntax for setting the colSpan property − object.colSpan = number Property Values The colSpan property accepts a numeric value that specifies how many columns the cell should span. The default value is 1, meaning the ...

Read More

HTML DOM TableData headers Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 134 Views

The HTML DOM TableData headers property returns and modifies the value of the headers attribute of a table cell () element. The headers attribute associates data cells with their corresponding header cells, improving table accessibility for screen readers. Syntax Following is the syntax for returning the headers attribute value − object.headers Following is the syntax for setting the headers attribute value − object.headers = "header_ids" Parameters The header_ids parameter is a space-separated list of header cell IDs that describe the current data cell. Each ID should correspond to a ...

Read More

HTML DOM Textarea Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 508 Views

The HTML DOM Textarea Object represents the element in an HTML document. This object provides properties and methods to create, access, and manipulate textarea elements dynamically using JavaScript. The textarea object is commonly used for multi-line text input in forms. Creating a Textarea Object You can create a new textarea element using the document.createElement() method − Syntax document.createElement("TEXTAREA"); Once created, you can set its properties and append it to the DOM to make it visible on the page. Properties of Textarea Object The textarea object provides numerous properties to control ...

Read More
Showing 171–180 of 1,509 articles
« Prev 1 16 17 18 19 20 151 Next »
Advertisements