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 to specify the kind of text track in HTML?
The kind attribute in HTML is used to specify the type of text track for the element. This attribute helps browsers understand how to handle and display different types of text tracks, such as subtitles, captions, descriptions, chapters, or metadata. Syntax Following is the syntax for the kind attribute − The kind attribute accepts one of the following values − subtitles − Translation of dialogue and sound effects (default value) captions − Transcription of dialogue, sound effects, and other audio information descriptions − Textual descriptions of video content for visually ...
Read MoreWhich HTML5 tags are more appropriate to represent money amount
When displaying money amounts in HTML5, several semantic tags can be used depending on the context and purpose. The choice depends on whether you need machine-readable data, emphasis, styling flexibility, or accessibility features. Available Options for Money Representation Here are the main approaches for representing monetary values in HTML5 − element − Provides both human-readable and machine-readable monetary values using the value attribute. element − For visual emphasis without semantic importance, suitable for highlighting prices in product listings. element − For semantically important amounts like total costs or final prices that need emphasis. ...
Read MoreHTML DOM Input Month max Property
The HTML DOM Input Month max property returns and modifies the value of the max attribute of an input field with type="month". This property sets the latest month that users can select in a month picker control. Syntax Following is the syntax for returning the max value − object.max Following is the syntax for setting the max value − object.max = "YYYY-MM" Here, YYYY represents the year and MM represents the month (e.g., "2019-02" for February 2019). Return Value The max property returns a string representing the maximum ...
Read MoreHTML DOM Input Month min Property
The HTML DOM Input Month min Property is used to set or return the value of the min attribute of an input field with type="month". This property defines the earliest month that users can select in the month input field. Syntax Following is the syntax for returning the min value − object.min Following is the syntax for setting the min value − object.min = "YYYY-MM" Here, YYYY represents the year (4 digits) and MM represents the month (01-12). For example, "2024-03" represents March 2024. Return Value The property ...
Read MoreHow do we create the title of the text track in HTML?
The label attribute in HTML is used to create the title of text tracks in the element. This attribute provides a user-readable title for the track that appears in the browser's media controls, helping users identify and select different subtitle, caption, or description tracks. Syntax Following is the syntax for using the label attribute in the element − Where label specifies a user-readable title for the text track. This title is displayed in the browser's track selection menu. Track Element Attributes The element supports several important attributes for ...
Read MoreHTML DOM Input Month readOnly Property
The HTML DOM Input Month readOnly property controls whether a month input field can be edited by the user. When set to true, the field becomes read-only and users cannot change its value, though the field remains focusable and its value is still included in form submissions. Syntax Following is the syntax for returning the readOnly property − object.readOnly Following is the syntax for setting the readOnly property − object.readOnly = true | false Parameters The readOnly property accepts the following boolean values − true − Makes ...
Read MoreHow to specify the language of the element's content in HTML?
The lang attribute in HTML specifies the language of an element's content. This attribute helps browsers, search engines, and screen readers understand the language being used, enabling proper text-to-speech pronunciation, spell checking, and search engine optimization. Syntax Following is the syntax for using the lang attribute − Content The language-code is typically a two-letter ISO 639-1 code (like "en" for English, "fr" for French) or a more specific variant (like "en-US" for American English). Common Language Codes Following are some commonly used language codes − en − English fr − ...
Read MoreI need a client side browser database in HTML5. What are my options?
HTML5 provides several client-side storage options for web applications. These technologies allow you to store data directly in the user's browser without requiring a server connection, making your applications faster and more responsive. The main client-side storage options in HTML5 include Local Storage, Session Storage, IndexedDB, and Web SQL Database (deprecated). Each serves different use cases based on data persistence, storage capacity, and complexity requirements. Local Storage Local Storage is the most commonly used client-side storage mechanism. It stores data as key-value pairs and persists data until explicitly cleared by the user or the application. The data ...
Read MoreHow to handle Geolocation errors in HTML5?
The HTML5 Geolocation API allows websites to access a user's geographical location with their permission. While this API provides powerful location-aware functionality, geolocation requests can fail due to various reasons such as user denial, network issues, or hardware problems. Proper error handling is essential to provide a good user experience when location services are unavailable. Syntax The geolocation methods use an error callback function to handle failures − navigator.geolocation.getCurrentPosition(successCallback, errorCallback, options); navigator.geolocation.watchPosition(successCallback, errorCallback, options); The error callback receives a PositionError object containing error details. PositionError Object The PositionError object is passed to ...
Read MoreExecute a script when the cue changes in a element in HTML?
The oncuechange event attribute executes a script when the active cue changes in a element. This event is particularly useful for video and audio elements that use text tracks for subtitles, captions, or descriptions. The oncuechange event fires whenever the browser switches from one cue to another in a text track, allowing developers to respond to subtitle changes, implement custom subtitle styling, or trigger other actions based on the current cue. Syntax Following is the syntax for the oncuechange attribute − Where script is the JavaScript code to execute when the ...
Read More