Articles on Trending Technologies

Technical articles with clear explanations and examples

Set the name of the form the element belongs to in HTML?

Jennifer Nicholas
Jennifer Nicholas
Updated on 16-Mar-2026 190 Views

The form attribute in HTML allows you to associate form controls with a specific form element, even when those controls are located outside the form's boundaries. This attribute references the id of the target form, enabling flexible form layouts and better organization of form elements. Syntax Following is the syntax for the form attribute − Submit Here, formId is the ID of the target form element that the control should belong to. How the Form Attribute Works The form attribute creates a logical connection between form controls and a form element. ...

Read More

How to play sound file in a web-page in the background?

Smita Kapse
Smita Kapse
Updated on 16-Mar-2026 26K+ Views

The HTML audio element is the modern standard for adding audio to web pages. To play a sound file in the background automatically when a page loads, you can use the element with the autoplay and loop attributes. The element can also be used but is less recommended for modern web development. Syntax Following is the syntax for the HTML audio element − Your browser does not support the audio element. Following is the syntax for the embed element ...

Read More

HTML DOM Anchor protocol Property

Arjun Thakur
Arjun Thakur
Updated on 16-Mar-2026 191 Views

The HTML DOM Anchor protocol property sets or returns the protocol portion of a URL in an anchor element's href attribute. The protocol identifies the scheme used to access the resource, such as http:, https:, ftp:, or file:. Syntax Following is the syntax to set the protocol property − anchorObject.protocol = "protocol:" Following is the syntax to return the protocol property − anchorObject.protocol Parameters The protocol property accepts a string value representing the URL protocol, including the colon (:). Common values include − http: − Standard web ...

Read More

HTML DOM Input Hidden value Property

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

The HTML DOM Input Hidden value property returns and modifies the content of the value attribute of an input field with type="hidden". Hidden input fields are invisible to users but store data that can be accessed and manipulated using JavaScript. Hidden input fields are commonly used to store temporary data, user session information, or values that need to be submitted with forms without displaying them to users. Syntax Following is the syntax for returning the value − object.value Following is the syntax for modifying the value − object.value = "text" ...

Read More

How to create an ordered list with list items numbered with lowercase roman numbers in HTML?

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

A list is a collection of connected items written consecutively, usually one below the other. HTML provides two main types of lists: unordered lists and ordered lists. An ordered list displays items with sequential markers like numbers, letters, or Roman numerals. You create an ordered list using the tag and define individual list items with tags. HTML supports 5 types of ordered list numbering systems using the type attribute − type="1" − Creates a numbered list starting from 1 (default). type="A" − Creates a list numbered with uppercase letters starting from A. type="a" − ...

Read More

Execute a script when the content of the element is being cut in HTML?

Yaswanth Varma
Yaswanth Varma
Updated on 16-Mar-2026 288 Views

The oncut attribute triggers when the user cuts content from an element. While all HTML elements support the oncut attribute, cutting content is only possible when the element's contenteditable attribute is set to "true" or when dealing with form input elements like and . The oncut event is part of the clipboard events family, along with oncopy and onpaste. It fires when the user performs a cut operation using Ctrl+X, right-click context menu, or programmatically through JavaScript. Syntax Following is the syntax for the oncut attribute − Content The function can be ...

Read More

HTML DOM Input Image Object

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

The HTML DOM Input Image Object represents the element with type="image" in an HTML document. This object provides an interface to create and manipulate image submit buttons that can be used in forms to submit data while displaying a custom image instead of a regular submit button. The Input Image Object is particularly useful when you want to create visually appealing submit buttons using custom images, while still maintaining all the functionality of a standard form submit button. Syntax Following is the syntax to create an Input Image Object using JavaScript − var imageInput ...

Read More

Execute a script when the element is being double-clicked in HTML?

Yaswanth Varma
Yaswanth Varma
Updated on 16-Mar-2026 508 Views

The dblclick event is triggered when a pointing device button (such as a mouse) is quickly clicked twice on the same element within a short time period. This event is commonly used to provide alternative actions or shortcuts in web applications, similar to double-clicking files in desktop environments. There are three main ways to implement double-click functionality in HTML − Using the ondblclick attribute directly in HTML elements Assigning the ondblclick property via JavaScript Using the addEventListener() method with the "dblclick" event Syntax Following are the different syntaxes for implementing double-click events − ...

Read More

HTML DOM Input Month Object

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

The HTML DOM Input Month Object represents an element with type="month". This input type allows users to select a month and year combination, displaying a month picker interface in supported browsers. The Input Month Object provides properties and methods to programmatically create, access, and manipulate month input fields through JavaScript. Syntax Following is the syntax to create an input month object using JavaScript − var monthInput = document.createElement("INPUT"); monthInput.setAttribute("type", "month"); You can also access an existing month input element − var monthInput = document.getElementById("monthId"); Properties Following are ...

Read More

How to specify that an element is not yet relevant in HTML?

Yaswanth Varma
Yaswanth Varma
Updated on 16-Mar-2026 283 Views

The hidden attribute in HTML is a boolean attribute used to specify that an element is not yet relevant or no longer applicable to the current state of the page. When present, browsers should not display the element to users. The hidden attribute serves multiple purposes − hiding content that becomes relevant only after certain conditions are met, removing outdated information from view, or concealing elements until user interactions make them applicable. It provides a semantic way to control element visibility without relying solely on CSS. Syntax Following is the syntax for the hidden attribute − ...

Read More
Showing 13561–13570 of 61,297 articles
Advertisements