The HTML DOM Input Checkbox disabled property sets or returns whether a checkbox input element is enabled or disabled. When a checkbox is disabled, it cannot be clicked or modified by the user and appears grayed out in the browser. Syntax Following is the syntax for returning the disabled state − inputCheckboxObject.disabled Following is the syntax for setting the disabled state − inputCheckboxObject.disabled = booleanValue Return Value The disabled property returns a boolean value indicating whether the checkbox is disabled (true) or enabled (false). Parameters The booleanValue ... Read More
The definition term is represented by the tag in HTML, which describes the name or term in a description list. The element works in conjunction with and tags to create structured definition lists. tag defines a description list container tag defines the term being described tag provides the description or definition for each term The tag supports both global and event attributes and is supported by all modern browsers. Syntax Following is the syntax for creating definition terms − Term ... Read More
The srclang attribute in HTML5 is used to specify the language of the track text data. This attribute is essential when working with elements to provide subtitles, captions, descriptions, or other text tracks for multimedia content. The srclang attribute helps browsers and assistive technologies understand what language the track content is written in. Syntax Following is the syntax for the srclang attribute − The language-code should be a valid BCP 47 language tag, such as "en" for English, "es" for Spanish, or "fr" for French. Parameters The srclang attribute accepts ... Read More
A bookmark link in HTML allows users to jump to specific sections within the same webpage or to sections on different pages. Bookmarks are particularly useful for long documents, creating table of contents, or providing quick navigation to important sections. HTML bookmarks work by combining the id attribute to mark target sections and anchor links with hash (#) references to jump to those sections. When clicked, the browser automatically scrolls to the bookmarked location. Syntax To create a bookmark link, first add an id attribute to the target element − Section Heading Then ... Read More
Use the srcset attribute to specify the URL of the image to use in different situations in HTML. This attribute allows you to provide multiple image sources for responsive images, enabling browsers to choose the most appropriate image based on screen size, resolution, or other conditions. Syntax The srcset attribute can be used in two main ways − Using srcset with img Element The srcset attribute on the element allows you to specify multiple image sources with their respective widths or pixel densities. The browser automatically selects ... Read More
The HTML DOM Input Checkbox Object represents an HTML input element with type "checkbox". It provides properties and methods to interact with checkbox elements programmatically, allowing you to get or set their state, value, and other attributes through JavaScript. Syntax Following is the syntax to create a checkbox element using JavaScript − var checkboxObject = document.createElement("input"); checkboxObject.type = "checkbox"; To access an existing checkbox element − var checkboxObject = document.getElementById("checkboxId"); // or var checkboxObject = document.getElementsByName("checkboxName")[0]; Properties The Input Checkbox Object has the following properties − ... Read More
The HTML DOM Input FileUpload autofocus property controls whether a file upload input field automatically receives focus when the page loads. This property corresponds to the HTML autofocus attribute and can be used to programmatically set or check the autofocus state of file input elements. Syntax Following is the syntax for getting the autofocus property value − inputFileUploadObject.autofocus Following is the syntax for setting the autofocus property − inputFileUploadObject.autofocus = booleanValue Return Value The autofocus property returns a boolean value indicating whether the file upload input has autofocus enabled ... Read More
The nofollow attribute in HTML creates a link that doesn't pass SEO authority to the target page. When you add rel="nofollow" to a link, it tells search engines not to follow the link or transfer any ranking credit to the destination website. Syntax Following is the syntax to create a nofollow link − Link Text The rel attribute specifies the relationship between the current document and the linked document. When set to "nofollow", it instructs search engines not to follow the link. Understanding Nofollow Links The rel="nofollow" attribute serves several purposes − ... Read More
The step attribute in HTML defines the legal number intervals for input fields. It specifies the increment value that users can select, creating a controlled range of acceptable values. The step attribute works with numeric input types like number, range, date, datetime-local, month, time, and week. Syntax Following is the syntax for the step attribute − The value can be a positive number, decimal, or the keyword any. When combined with min and max attributes, it creates a complete range validation system. Step Attribute with Number Input The step attribute controls ... Read More
The HTML DOM Input Checkbox required property determines whether a checkbox input must be checked before a form can be submitted. This property corresponds to the HTML required attribute and provides a way to enforce mandatory checkbox selections in web forms. Syntax Following is the syntax for getting the required property value − inputCheckboxObject.required Following is the syntax for setting the required property − inputCheckboxObject.required = booleanValue Return Value The required property returns a Boolean value − true − The checkbox is required and must be checked ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Economics & Finance