Articles on Trending Technologies

Technical articles with clear explanations and examples

How to add a list item in HTML?

Sindhura Repala
Sindhura Repala
Updated on 16-Mar-2026 2K+ Views

To add a list item in HTML, use the tag. It can be used inside ordered lists (), unordered lists (), and menu lists (). In an ordered list, the list items are displayed with numbers or letters. In an unordered list and menu list, the list items are displayed with bullet points. Syntax Following is the syntax for the list item tag in HTML − Content The tag must be placed inside a list container like , , or . Attributes The tag supports the following specific attributes ...

Read More

Execute a script when a context menu is triggered in HTML5?

Nancy Den
Nancy Den
Updated on 16-Mar-2026 281 Views

The contextmenu attribute in HTML5 allows you to execute a script when a context menu is triggered. A context menu appears when a user right-clicks on an element. This attribute links an element to a custom element that defines the context menu options. Syntax Following is the syntax for the contextmenu attribute − Content The contextmenu attribute value must match the id of a element with type="context". Basic Context Menu Example Following example demonstrates how to create a basic context ...

Read More

HTML DOM Input Date form Property

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

The Input Date form property returns a reference to the form element that contains the input date field. This property is read-only and provides access to the enclosing form object, allowing you to retrieve form attributes like ID, action, or method through JavaScript. Syntax Following is the syntax for accessing the form property − inputDateObject.form Return Value The form property returns a reference to the form element that contains the input date field. If the input date is not inside a form, it returns null. Example − Getting Form Reference Following ...

Read More

What is horizontal rule in HTML Page?

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

The tag in HTML creates a horizontal rule that serves as a visual separator between content sections on a web page. It displays as a horizontal line and is most commonly used to divide content thematically, making the page structure clearer and more readable. The tag is a self-closing element in HTML, meaning it doesn't require a closing tag. It creates a thematic break in the content flow and is rendered as a horizontal line by default. Syntax Following is the syntax for the tag − The tag ...

Read More

Create a command/menu item that the user can invoke from a popup menu in HTML5

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

The tag in HTML5 was designed to create command/menu items that users can invoke from popup context menus. However, it's important to note that this element has been deprecated and is no longer supported in modern browsers due to lack of widespread adoption and implementation inconsistencies. The tag was intended to work with the element to create interactive context menus that would appear when users right-clicked on elements with a contextmenu attribute. Syntax Following is the syntax for the deprecated tag − Attributes ...

Read More

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

Abhinaya
Abhinaya
Updated on 16-Mar-2026 2K+ Views

Use the onclick attribute to execute a script when an element is clicked in HTML. The onclick attribute allows you to run JavaScript functions directly when a user interacts with elements like buttons, links, divs, or any clickable HTML element. Syntax Following is the syntax for the onclick attribute − Content You can also execute JavaScript code directly within the onclick attribute − Content Using onclick with Button Elements Example − Basic onclick Function Following example demonstrates how to use the onclick attribute to execute a JavaScript function ...

Read More

HTML DOM Anchor origin Property

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

The HTML DOM Anchor origin property returns a string containing the protocol, hostname, and port number of a URL. This is a read-only property that provides the origin portion of the anchor element's href attribute value. Syntax Following is the syntax for the Anchor origin property − anchorElement.origin Return Value The origin property returns a string representing the origin of the URL, which includes − Protocol − The scheme part (http:, https:, ftp:, etc.) Hostname − The domain name or IP address Port − The port number (if explicitly specified) ...

Read More

HTML DOM Input Date name Property

Rama Giri
Rama Giri
Updated on 16-Mar-2026 216 Views

The HTML DOM Input Date name property gets or sets the value of the name attribute for an HTML element. This property is essential for identifying form data when submitted to a server, as the name serves as the key in name-value pairs. Syntax Following is the syntax to get the name attribute value − inputDateObject.name Following is the syntax to set the name attribute value − inputDateObject.name = "newName" Parameters newName − A string value representing the new name for the input date element. ...

Read More

How to specify the URL of the page the link goes to in HTML?

Abhinanda Shri
Abhinanda Shri
Updated on 16-Mar-2026 769 Views

The href attribute in HTML is used to specify the URL of the page that a link should navigate to. The href attribute is primarily used with the (anchor) tag to create hyperlinks that allow users to navigate between web pages or different sections within the same page. Syntax Following is the syntax for using the href attribute with anchor tags − Link Text The URL can be an absolute URL, relative URL, or an anchor link to a section within the same page. Types of URLs in href Attribute The ...

Read More

HTML DOM Input Date max Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 248 Views

The HTML DOM Input Date max property is used to set or return the value of the max attribute of an input element with type="date". This property defines the maximum date that users can select in a date picker, helping to create date range restrictions in forms. Syntax Following is the syntax for returning the max value − inputDateObject.max Following is the syntax for setting the max value − inputDateObject.max = "YYYY-MM-DD" Parameters The max property accepts a string value in the format YYYY-MM-DD representing the maximum selectable date. ...

Read More
Showing 13731–13740 of 61,299 articles
Advertisements