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 Date required Property
The HTML DOM Input Date required property determines whether a date input field must be filled before the form can be submitted. This property returns a boolean value indicating the required state and can also be used to set the required attribute dynamically. Syntax Following is the syntax for getting the required property value − inputDateObject.required Following is the syntax for setting the required property − inputDateObject.required = booleanValue Parameters The booleanValue parameter can be one of the following values − Value Description ...
Read MoreHow to allow no breaks in the enclosed text in HTML?
To prevent line breaks in enclosed text in HTML, the tag was traditionally used to force content onto a single line regardless of length. However, this tag is deprecated and not supported in HTML5. Modern HTML uses CSS properties like white-space: nowrap to achieve the same result with better standards compliance. Syntax Following is the deprecated syntax for the tag − Text content Following is the modern CSS approach − white-space: nowrap; The Deprecated Tag The HTML tag instructed browsers not to break the specified ...
Read MoreHTML DOM Anchor port Property
The HTML DOM Anchor port property is used to set or return the port number of a URL in the href attribute of an anchor element. This property represents the port number portion of the URL, which appears after the hostname and is separated by a colon. Syntax Following is the syntax to set the port property − anchorObj.port = portNumber Following is the syntax to return the port property − anchorObj.port Here, portNumber is a string representing the port number of the URL. If no port is specified in ...
Read MoreHTML DOM Input Date step Property
The HTML DOM Input Date step property sets or returns the value of the step attribute of a date input field. This property determines the legal day intervals that users can select when opening the date picker calendar. Syntax Following is the syntax for returning the step value − inputDateObject.step Following is the syntax for setting the step value − inputDateObject.step = number Parameters The step property accepts a numeric value that represents the number of days between selectable dates. The default value is 1, meaning all dates are ...
Read MoreHow to create a Bibliography with HTML?
A bibliography is a list of written sources of information on a subject, typically found at the end of academic papers, books, or research documents. In HTML, we can create well-structured bibliographies using semantic tags like for work titles and or for organizing the references. The tag defines the title of a creative work such as a book, article, song, painting, or movie. It provides semantic meaning to indicate that the enclosed text represents a work title or citation. The text inside tags renders in italic format by default in most browsers. Syntax ...
Read MoreHTML DOM Select form Property
The HTML DOM select form property returns a reference to the form element that contains the dropdown list. This read-only property is useful for identifying which form a select element belongs to, especially in documents with multiple forms. Syntax Following is the syntax for the select form property − selectElement.form Return Value The property returns a reference to the form element that contains the select element. If the select element is not within a form, it returns null. Example − Basic Form Reference Following example demonstrates how to get the form ...
Read MoreHTML DOM Select autofocus Property
The HTML DOM Select autofocus property sets or returns whether a dropdown list should automatically receive focus when the page loads. This property corresponds to the HTML autofocus attribute and is useful for improving user experience by directing attention to important form elements. Syntax Following is the syntax for returning the autofocus property − selectObject.autofocus Following is the syntax for setting the autofocus property − selectObject.autofocus = true | false Property Values The autofocus property accepts the following values − true − The dropdown list will automatically ...
Read MoreHTML DOM Select selectedIndex Property
The HTML DOM select selectedIndex property returns and modifies the index of the selected option in a dropdown list. The index is zero-based, meaning the first option has an index of 0, the second option has an index of 1, and so on. Syntax Following is the syntax for returning the selectedIndex − object.selectedIndex Following is the syntax for modifying the selectedIndex − object.selectedIndex = number Return Value The selectedIndex property returns an integer representing the index of the selected option. If no option is selected, it returns -1. ...
Read MoreHTML DOM Select add() Method
The HTML DOM select add() method is used to add a new option element to an HTML dropdown list. This method dynamically inserts options into existing select lists, making it useful for creating interactive forms where options are added based on user actions or other conditions. Syntax Following is the syntax for the select add() method − selectObject.add(option, index) Parameters The add() method accepts the following parameters − option − An HTMLOptionElement object or HTMLOptGroupElement object to be added to the select list. index (optional) − An integer specifying the ...
Read MoreHow we can put three divisions side by side in HTML?
The tag defines a division or section in an HTML document. This tag is mainly used to group similar content together for easy styling and also serves as a container for other HTML elements. There are multiple CSS techniques to place three divisions side by side in HTML. Syntax Following is the basic syntax for the tag − Content... Method 1 − Using display: inline-block The display: inline-block property allows elements to sit side by side while maintaining block-level properties like width and height. This is one of the simplest methods ...
Read More