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
HTML DOM Select disabled Property
The HTML DOM select disabled property is used to get or set whether a dropdown list is disabled or enabled. When a select element is disabled, users cannot interact with it, and it appears grayed out in most browsers. Syntax Following is the syntax for getting the disabled property − object.disabled Following is the syntax for setting the disabled property − object.disabled = true | false Return Value The disabled property returns a Boolean value − true − The select element is disabled false ...
Read MoreHow to create the tabbing order of an element in HTML?
The tabindex attribute in HTML controls the sequential keyboard navigation order of elements, typically using the TAB key. It determines which elements can receive focus and in what order users will navigate through them when using keyboard navigation. Syntax Following is the syntax for the tabindex attribute − Content The tabindex value can be − Positive integer (1, 2, 3, ...) − Creates a custom tab order. Elements are focused in ascending numerical order before any elements with tabindex="0". 0 (zero) − Includes the element in the natural tab order based on ...
Read MoreHTML for Attribute
The for attribute of the element establishes a relationship between the calculation result and the input elements used in that calculation. This attribute helps browsers and assistive technologies understand which form controls contribute to the output value. Syntax Following is the syntax for the for attribute − result The value is a space-separated list of element IDs that participate in the calculation. These IDs must reference form controls within the same document. Parameters The for attribute accepts the following parameter − id list − A space-separated string of element ...
Read MoreHTML DOM Select length Property
The HTML DOM select length property returns the number of elements inside a drop-down list. This read-only property is useful for dynamically counting options in a select element without manually iterating through them. Syntax Following is the syntax for the select length property − selectObject.length Return Value The length property returns a number representing the total count of elements within the select element. If no options are present, it returns 0. Example − Basic Usage Following example demonstrates how to get the number of options in a select element ...
Read MoreHow to create hidden comments in HTML?
HTML comments are used to add notes and documentation to your code that are not displayed in the browser. They help developers understand the code structure and temporarily hide content without deleting it. HTML comments allow you to document your code, hide content temporarily, and leave notes for other developers. The browser completely ignores commented content, making it invisible to website visitors but visible in the page source. Syntax Following is the syntax to create comments in HTML − Comments start with . Everything between these markers is hidden from the browser ...
Read MoreHow to specify the number of visible options for in HTML?
The size attribute in HTML is used to specify the number of visible options in a dropdown list. By default, a select element shows only one option and displays as a dropdown. When you add the size attribute, it transforms the dropdown into a scrollable list box showing multiple options at once. Syntax Following is the syntax for the size attribute − Option 1 Option 2 Where number is a positive integer representing how many options should be visible without scrolling. Default Behavior vs ...
Read MoreHTML DOM Select multiple Property
The HTML DOM select multiple property sets or returns whether multiple options can be selected from a drop-down list. When enabled, users can select multiple options by holding Ctrl (Windows) or Cmd (Mac) while clicking, or by using Shift to select a range. Syntax Following is the syntax for returning the multiple property − object.multiple Following is the syntax for setting the multiple property − object.multiple = true | false Property Values Value Description true Allows multiple options to be selected from ...
Read MoreHow to create conditional comments in HTML?
Conditional comments are HTML comments that contain special syntax to target specific versions of Internet Explorer. They allow developers to include or exclude HTML content based on the browser and version being used, helping solve cross-browser compatibility issues that were common with older IE versions. HTML Comments Overview Before understanding conditional comments, let's review regular HTML comments and their characteristics − HTML comments are non-executable statements used to describe or annotate code. Comments use the syntax with opening and closing tags. Comments can be placed anywhere in HTML but are commonly placed after the DOCTYPE ...
Read MoreHow do we add the width in characters for in HTML?
The size attribute in HTML input elements specifies the visible width of an input field in terms of characters. This attribute controls how wide the input field appears on the screen, making it useful for creating forms with appropriately sized input fields based on expected content length. The size attribute works with text-based input types including text, search, tel, url, email, and password. While it affects the display width, it does not limit the actual number of characters a user can enter − that requires the maxlength attribute. Syntax Following is the syntax for the size attribute ...
Read MoreHTML DOM Select name Property
The HTML DOM Select name property returns and modifies the value of the name attribute of a dropdown list (select element) in an HTML document. This property is essential for form data processing and server-side identification of form elements. Syntax Following is the syntax for returning the name property − object.name Following is the syntax for modifying the name property − object.name = "text" Parameters text − A string value that specifies the new name for the select element. Return Value The property returns a ...
Read More