Articles on Trending Technologies

Technical articles with clear explanations and examples

HTML DOM HTML Object

Sharon Christine
Sharon Christine
Updated on 16-Mar-2026 410 Views

The HTML DOM HTML Object represents the element of an HTML document. This object provides access to the root element that contains all other HTML elements on the page, including the and sections. The HTML object is useful for accessing document-wide properties, manipulating the entire document structure, or retrieving all content within the HTML element. It serves as the top-level container for all page elements. Syntax Following is the syntax to access the HTML object using getElementsByTagName() − document.getElementsByTagName("HTML")[0] Alternative syntax using documentElement property − document.documentElement ...

Read More

HTML cite Attribute

Ankith Reddy
Ankith Reddy
Updated on 16-Mar-2026 256 Views

The cite attribute in HTML specifies a URL that points to a document or source explaining the reason for a modification. It is commonly used with elements like , , , and to provide context or justification for content changes and citations. Syntax Following is the syntax for the cite attribute − inserted text deleted text quoted text quoted content Where URL is the web address of the document that explains the reason for the insertion, deletion, or the source of the quotation. Using Cite with the INS Element The ...

Read More

HTML DOM Input DatetimeLocal type Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 176 Views

The HTML DOM Input DatetimeLocal type property is used to get or set the type attribute of an HTML input element that handles datetime-local values. This property allows you to programmatically read the current input type or change it to a different type at runtime. Syntax Following is the syntax for getting the type property − inputDatetimeLocalObject.type Following is the syntax for setting the type property − inputDatetimeLocalObject.type = stringValue Return Value The property returns a string representing the type of the input element. For datetime-local inputs, it returns ...

Read More

How to use autocomplete attribute in HTML?

Kumar Varma
Kumar Varma
Updated on 16-Mar-2026 721 Views

The HTML autocomplete attribute controls whether browsers should automatically fill in form fields based on previously entered values. When set to on, the browser provides suggestions from the user's input history. When set to off, it disables this functionality for enhanced privacy or security. The autocomplete attribute can be applied to both elements (affecting all contained inputs) and individual elements for granular control. Syntax Following is the syntax for using the autocomplete attribute with form elements − ... Following is the syntax for using the autocomplete attribute with input elements − ...

Read More

Execute a script each time the volume of a video/audio is changed in HTML?

Chandu yadav
Chandu yadav
Updated on 16-Mar-2026 174 Views

The onvolumechange attribute fires when the user changes the volume of a video or audio element. This event triggers for any volume modification including volume up, volume down, mute, or unmute operations. Syntax Following is the syntax for using the onvolumechange attribute − ... ... The function is called whenever the volume property of the media element changes, including programmatic changes and user interactions with the volume controls. Using onvolumechange with Video Element Example Following example demonstrates the onvolumechange attribute with a video element − ...

Read More

HTML DOM Input DatetimeLocal value Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 184 Views

The HTML DOM Input DatetimeLocal value property is used to get or set the value of a datetime-local input field. This property returns a string representing the current value, or allows you to programmatically change the input's value using JavaScript. The datetime-local input type allows users to select both a date and time without timezone information. The value is always stored in the format YYYY-MM-DDTHH:MM, where T separates the date and time components. Syntax Following is the syntax for getting the value − inputDatetimeLocalObject.value Following is the syntax for setting the value − ...

Read More

How to center align text in table cells in HTML?

Lokesh Badavath
Lokesh Badavath
Updated on 16-Mar-2026 131K+ Views

We use the CSS property text-align to center align text in table cells. The text-align property controls the horizontal alignment of content within and elements. By default, table header cells () are center-aligned, while table data cells () are left-aligned. We can override this default behavior using CSS to achieve the desired alignment. The property accepts values like center, left, right, and justify. Syntax Following is the syntax to center align text in elements − Table header... Following is the syntax to center align text in elements − ...

Read More

How to display human readable date in HTML?

Priya Pallavi
Priya Pallavi
Updated on 16-Mar-2026 633 Views

Use the HTML tag to display human-readable dates and times while providing machine-readable datetime information for browsers, search engines, and assistive technologies. The element enhances accessibility and helps with SEO by making temporal content semantically meaningful. Syntax Following is the syntax for the HTML tag − Human readable date/time The datetime attribute is optional but recommended for providing precise machine-readable temporal information. Attributes The tag supports the following specific attribute − Attribute Value Description datetime Valid datetime string Specifies the ...

Read More

HTML DOM Input Email autocomplete Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 237 Views

The HTML DOM Input Email autocomplete property sets or returns whether autocomplete is enabled or disabled for an email input field. When enabled, the browser displays previously typed email values as suggestions to help users fill the field more quickly. Syntax Following is the syntax to return the current autocomplete setting − inputEmailObject.autocomplete Following is the syntax to set the autocomplete property − inputEmailObject.autocomplete = value Property Values The autocomplete property accepts the following string values − Value Description on Enables ...

Read More

HTML DOM Option text Property

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 202 Views

The HTML DOM option text property allows you to retrieve and modify the text content of an element within a dropdown. This property is useful for dynamically updating option labels without recreating the entire select element. Syntax Following is the syntax for getting the text value − optionElement.text Following is the syntax for setting the text value − optionElement.text = "newText" Return Value The property returns a string representing the text content of the option element. When setting, it accepts a string value that becomes the new ...

Read More
Showing 13491–13500 of 61,297 articles
Advertisements