Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
How do we set the range that is considered to be of low value in HTML?
The low attribute in HTML defines the range that is considered to be of low value in a gauge. It works exclusively with the element to set the threshold below which values are considered low. The low attribute helps browsers visually indicate when a meter's value falls within the low range, typically by changing the gauge's color or appearance. Note − The low attribute can only be used with the tag. Syntax Following is the syntax for the low attribute − Content Parameters The low attribute accepts the following parameter ...
Read MoreHTML DOM Input Month required Property
The HTML DOM Input Month required property is used to set or return whether a month input field must be filled out before submitting a form. This property corresponds to the HTML required attribute and provides client-side validation for month input elements. Syntax Following is the syntax for getting the required property − object.required Following is the syntax for setting the required property − object.required = true | false Property Values The required property accepts the following boolean values − true − The month input field is ...
Read MoreHow to specify that the audio/video will start over again, every time it is finished in HTML?
Use the loop attribute to specify that the audio/video will start over again every time it is finished. The loop attribute is a boolean attribute that, when present, causes the media to automatically restart from the beginning once it reaches the end. Syntax Following is the syntax for the loop attribute − For audio elements − Using Loop with Video Element The loop attribute works with the HTML5 element to create continuous playback. When the video ...
Read MoreHow can I invoke encodeURIComponent from AngularJS template in HTML?
The encodeURIComponent() function is a JavaScript method that encodes special characters in URI components by replacing them with UTF-8 escape sequences. In AngularJS templates, you can invoke this function through controller methods, filters, or direct expressions to safely encode URLs, query parameters, and other URI components. Each time a special character appears in a URI component, the encodeURIComponent() function replaces it with one, two, three, or four escape sequences representing the character's UTF-8 encoding (four escape sequences are used for characters composed of two "surrogate" characters). Syntax Following is the syntax for encodeURIComponent() − encodeURIComponent(uriComponent) ...
Read MoreHTML DOM Input Month step Property
The HTML DOM Input Month step property is used to get or set the value of the step attribute for an input element of type month. The step attribute specifies the legal number intervals for month values, controlling how the month picker increments or decrements when using the arrow controls. When you set a step value, the month input will only accept values that are multiples of that step from the minimum value. For example, with step="3", the input will increment by 3 months at a time. Syntax Following is the syntax for returning the step value ...
Read MoreHow to use HTML5 localStorage and sessionStorage?
HTML5 introduced two powerful mechanisms for storing data on the client side − localStorage and sessionStorage. These storage options overcome the limitations of traditional HTTP cookies by providing larger storage capacity and reducing unnecessary data transmission with every HTTP request. The key advantages of HTML5 web storage over cookies include − No automatic transmission − Storage data is not sent with every HTTP request, improving web application performance. Larger storage capacity − Web storage can hold approximately 5-10 MB of data per domain, compared to cookies' 4 KB limit. Better performance − ...
Read MoreHTML DOM Anchor password Property
The HTML DOM Anchor password property sets or returns the password portion of an anchor element's href attribute value. This property is part of the URL structure that includes user credentials in the format https://username:password@hostname.com. Syntax To set the password property − anchorObject.password = "newPassword" To return the password property − anchorObject.password Return Value The password property returns a string representing the password part of the URL. If no password is specified in the href attribute, it returns an empty string. Example − Getting Anchor Password Following ...
Read MoreHow do we add the maximum number of characters allowed in an element in HTML?
In HTML, the maxlength attribute is used to limit the maximum number of characters that can be entered in an input field or textarea element. This attribute helps control user input and ensures data consistency in forms by preventing users from entering more characters than allowed. Syntax Following is the syntax for the maxlength attribute − Following is the syntax for textarea elements − Here, number represents the maximum number of characters allowed. The value must be a non-negative integer. Basic Usage with Input Fields The ...
Read MoreExecute a script when the dragged element is being dropped in HTML?
The ondrop event in HTML is triggered when a dragged element or text selection is dropped onto a valid drop target. This event is essential for implementing drag and drop functionality, allowing users to move elements between different areas of a webpage. The ondrop event works in conjunction with other drag events like ondragstart, ondragover, and ondrag to create a complete drag and drop experience. Syntax Following is the syntax for the ondrop event − content The ondrop event handler receives an event object that contains information about the drag operation, including the ...
Read MoreExecute a script when the length of the media changes in HTML?
The ondurationchange attribute in HTML triggers when the duration of an audio or video element changes. This event occurs when the browser has loaded enough of the media file to determine its total length, or when the duration metadata becomes available. Syntax Following is the syntax for the ondurationchange attribute − The attribute can also be added using JavaScript − audioElement.ondurationchange = function() { /* code */ }; videoElement.addEventListener("durationchange", myFunction); When Duration Changes Occur The ondurationchange event is fired in the following scenarios − When ...
Read More