Articles on Trending Technologies

Technical articles with clear explanations and examples

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 356 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 189 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 177 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 638 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 207 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

How to use image height and width attribute in HTML Page?

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

Images make web content more engaging and help users better understand the information presented. In HTML, we can control the display size of images using the width and height attributes of the tag. The tag is a self-closing element that requires the src attribute to specify the image location. The width and height attributes allow us to define the display dimensions of the image without modifying the original file. Syntax Following is the syntax for using width and height attributes with the image tag − The width and height values ...

Read More

Execute a script each time the playback rate changes in HTML?

vanithasree
vanithasree
Updated on 16-Mar-2026 184 Views

The onratechange event attribute in HTML executes a JavaScript function whenever the playback rate of an audio or video element changes. This event is particularly useful for creating custom media controls or displaying the current playback speed to users. Syntax Following is the syntax for the onratechange attribute − ... ... The onratechange attribute can be used with both and elements. The function specified will execute each time the playbackRate property changes. Playback Rate Property The playbackRate property controls the speed at which media content plays − 1.0 ...

Read More

HTML size Attribute

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

The size attribute in HTML controls the number of visible options displayed in a element. When the size is set to 1 or omitted, the select element appears as a dropdown list. When size is greater than 1, it displays as a list box showing multiple options simultaneously with a scrollbar if needed. Syntax Following is the syntax for the size attribute − Option 1 Option 2 Here, number is a positive integer representing the number of visible options. If the size attribute is not ...

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