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 Input Number autofocus Property
The HTML DOM Input Number autofocus property returns and modifies whether a number input field should automatically receive focus when the page loads. This property corresponds to the autofocus HTML attribute and allows dynamic control over input focus behavior. Syntax Following is the syntax for returning the autofocus property − object.autofocus Following is the syntax for setting the autofocus property − object.autofocus = true | false Return Value The property returns a Boolean value − true − if the input number field has autofocus enabled false − ...
Read MoreHow to specify if and how the author thinks the audio/video should be loaded when the page loads in HTML?
The preload attribute in HTML5 allows authors to provide hints to the browser about how much of an audio or video file should be loaded when the page loads. This attribute helps optimize the user experience by controlling bandwidth usage and load times based on the content's expected usage. Syntax Following is the syntax for the preload attribute − The value can be none, metadata, or auto. Preload Attribute Values The preload attribute accepts three possible values ...
Read MoreHTML width Attribute
The width attribute in HTML is specifically used with the element to control the display width of image-based submit buttons. This attribute allows you to resize images used as form submission buttons without affecting their original file dimensions. Syntax Following is the syntax for using the width attribute with input elements − Here, width represents the desired width in pixels. The height attribute is often used together to maintain proper image proportions. How It Works The width attribute is only applicable to elements. When you specify a width value, ...
Read MoreHTML DOM Input Number disabled Property
The HTML DOM Input Number disabled property is used to get or set whether an input field of type="number" is disabled or not. When an input number field is disabled, it becomes non-interactive and cannot receive user input, and its value is not submitted with the form. Syntax Following is the syntax for returning the disabled property − object.disabled Following is the syntax for setting the disabled property − object.disabled = true | false Property Values The disabled property accepts the following boolean values − true − ...
Read MoreHow to automatically redirect a Web Page to another URL?
Page redirection is a technique where visitors clicking on a URL are automatically directed to a different page than originally intended. This happens seamlessly in the background and is commonly used for moving content, temporary maintenance pages, or directing users to updated URLs. To redirect from an HTML page, use the meta tag with the http-equiv attribute. This attribute provides an HTTP header for the value of the content attribute, which specifies the number of seconds to wait before redirecting and the destination URL. Syntax Following is the syntax for HTML page redirection using the meta tag ...
Read MoreHow to specify that the element is read-only in HTML?
In HTML, the readonly attribute specifies that an input field or textarea element cannot be edited by the user. The element displays its value but does not accept user input, making it useful for displaying data that should not be modified while still allowing the value to be submitted with forms. The readonly attribute is commonly used for form fields that contain calculated values, reference data, or information that should be visible but not editable. Unlike the disabled attribute, readonly elements can still receive focus and their values are included in form submissions. Syntax Following is the ...
Read MoreHTML DOM Input Number name Property
The HTML DOM Input Number name property returns and modifies the value of the name attribute of an input field with type="number". The name attribute identifies the input field when form data is submitted to the server. Syntax Following is the syntax for returning the name value − object.name Following is the syntax for modifying the name value − object.name = "text" Return Value The name property returns a string representing the value of the name attribute of the input number field. Example − Getting Name Property ...
Read MoreHow to redirect URL to the different website after few seconds?
Page redirection is a situation where you click a URL to reach page X but are automatically directed to another page Y. This happens due to page redirection configured by the website developer. To redirect a URL to a different website after a few seconds, use the META tag with the http-equiv="refresh" attribute and the content attribute. The content attribute sets the delay in seconds before the redirect occurs. Syntax Following is the syntax for URL redirection using the META tag − Where − seconds − The number of seconds ...
Read MoreHTML DOM Input Number readOnly Property
The HTML DOM Input Number readOnly property sets or returns whether a number input field is read-only. When set to true, the input field becomes non-editable but remains focusable and its value can still be selected and copied. Syntax Following is the syntax to return the readOnly property − object.readOnly Following is the syntax to set the readOnly property − object.readOnly = true | false Property Values true − The input field is read-only and cannot be modified by the user. false − The input field is editable ...
Read MoreHow to specify that the element must be filled out before submitting the form in HTML?
The required attribute in HTML is used to specify that a form element must be filled out before the form can be submitted. When a required field is left empty and the user attempts to submit the form, the browser displays a validation message and prevents form submission until the field is completed. The required attribute is a boolean attribute that can be applied to , , and elements. When present, it makes the form field mandatory for successful form submission. Syntax Following is the syntax for the required attribute − ... ...
Read More