Articles on Trending Technologies

Technical articles with clear explanations and examples

Execute a script when an error occurs in HTML?

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

The onerror event in HTML allows you to execute a script when an error occurs while loading external resources like images, scripts, or stylesheets. This event is essential for handling loading failures gracefully and providing user feedback when resources cannot be accessed. The onerror event is triggered when an external file fails to load, such as when an image source is broken, a script file is missing, or a stylesheet cannot be found. This event helps improve user experience by allowing developers to display alternative content or error messages. Syntax Following is the syntax for using the ...

Read More

How to set the audio output of the video to mute in HTML?

Sreemaha
Sreemaha
Updated on 16-Mar-2026 478 Views

Use the muted attribute to set the audio output of the video to mute in HTML. The muted attribute is a boolean attribute that specifies whether the video's audio should be initially silenced when the page loads. Syntax Following is the syntax for the muted attribute − The muted attribute can be written in three ways − muted − Boolean attribute (recommended) muted="muted" − Explicit value muted="" − Empty value How It Works When the muted attribute is present, the video element will start ...

Read More

How Server-Sent Events Works in HTML5?

Jai Janardhan
Jai Janardhan
Updated on 16-Mar-2026 524 Views

Server-Sent Events (SSE) is an HTML5 technology that allows a web server to push data to a client automatically. Unlike traditional polling methods, SSE maintains a persistent connection where the server continuously sends updates to the client without requiring repeated requests. How Server-Sent Events Work Server-Sent Events establish a one-way communication channel from server to client. The client opens a connection to the server using the EventSource API, and the server keeps this connection alive to send real-time updates. This is particularly useful for live feeds, notifications, chat messages, and real-time data updates. Server-Sent ...

Read More

HTML download Attribute

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

The download attribute of the element is used to set the name of the file to be downloaded when a user clicks on the hyperlink. This attribute forces the browser to download the linked resource instead of navigating to it. Syntax Following is the syntax for the download attribute − Here, filename is the suggested name for the downloaded file. If the value is omitted, the browser will use the original filename from the server. Parameters The download attribute accepts the following value − filename (optional) − A ...

Read More

HTML DOM Input Month form Property

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

The HTML DOM input month form property returns a reference to the form element that contains the month input field. This read-only property is useful for identifying which form a month input belongs to, especially in documents with multiple forms. Syntax Following is the syntax for accessing the form property − monthInputElement.form Return Value The property returns a reference to the element that contains the month input field, or null if the input is not contained within a form. Example − Basic Form Reference Following example demonstrates how to get ...

Read More

How to add a YouTube Video to your Website?

Fendadis John
Fendadis John
Updated on 16-Mar-2026 968 Views

To add a YouTube video to your website, you need to embed it using the element. The src attribute contains the video URL, while the width and height attributes control the video player dimensions. YouTube provides an embed URL that differs from the regular viewing URL. Instead of using the standard watch URL, you must use YouTube's embed URL format for proper integration into your webpage. Syntax Following is the basic syntax for embedding a YouTube video − Replace VIDEO_ID with the actual YouTube video ID found in the video URL. ...

Read More

HTML DOM Input Number Object

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

The HTML DOM Input Number Object represents an element with type="number". This object provides properties and methods to interact with number input fields programmatically through JavaScript. The Input Number Object is useful for creating dynamic forms, validating numeric input, and implementing custom number controls with step increment/decrement functionality. Syntax You can create an Input Number Object in two ways − Creating a new Input Number element: var numberInput = document.createElement("INPUT"); numberInput.setAttribute("type", "number"); Accessing an existing Input Number element: var numberInput = document.getElementById("myNumber"); Properties The Input Number ...

Read More

How to automatically redirect your visitors to your new home page?

Arjun Thakur
Arjun Thakur
Updated on 16-Mar-2026 2K+ Views

Page redirection is a situation where you click a URL to reach a page X but are internally directed to another page Y. This happens due to page redirection setup by the website developer. HTML provides a simple way to automatically redirect visitors from one page to another using the META tag. To redirect from an HTML page, use the META tag with the http-equiv attribute. The http-equiv attribute provides an HTTP header for the value of the content attribute. The value in the content is the number of seconds you want the page to wait before redirecting. ...

Read More

How to specify that the details should be visible to the user in HTML?

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

The element in HTML creates interactive widgets that users can open and close to reveal additional content. By default, the details are hidden and only the summary text is visible. You can control whether the details should be initially visible using the open attribute. Syntax Following is the syntax for the element − Summary text Content to be revealed... To make the details visible by default, use the open attribute − Summary text Content that ...

Read More

HTML DOM Input Number stepUp() Method

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

The HTML DOM Input Number stepUp() method is used to increment the value of a number input field by a specified amount. This method provides a programmatic way to increase numeric values, which is particularly useful for creating custom increment controls or automated value adjustments. Syntax Following is the syntax for the stepUp() method − numberInputObject.stepUp(stepValue) Parameters The stepUp() method accepts the following parameter − stepValue (optional) − A number specifying how much to increment the input value. If omitted, the default value is 1. Return Value This ...

Read More
Showing 13611–13620 of 61,297 articles
Advertisements