Articles on Trending Technologies

Technical articles with clear explanations and examples

HTML DOM Input Date readOnly Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 296 Views

The HTML DOM Input Date readOnly property is used to control whether a date input field can be modified by the user. When set to true, the date input becomes read-only and users cannot change its value, though it remains focusable and its value is still submitted with forms. Syntax Following is the syntax to get the readOnly property value − inputDateObject.readOnly Following is the syntax to set the readOnly property − inputDateObject.readOnly = booleanValue Property Values The readOnly property accepts the following boolean values − ...

Read More

How to set background color in HTML?

Lokesh Badavath
Lokesh Badavath
Updated on 16-Mar-2026 246K+ Views

Setting the background color in HTML allows you to customize the appearance of your web page and create visually appealing layouts. In modern HTML5, background colors are set using CSS, either through inline styles or external stylesheets. Syntax Following is the basic syntax to set background color using the CSS background-color property − Alternatively, you can use CSS in the section − body { background-color: colorname; } Note − The bgcolor attribute was deprecated in HTML5. Always use the CSS background-color property instead. Setting ...

Read More

HTML DOM Input Date required Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 254 Views

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 More

How to allow no breaks in the enclosed text in HTML?

Bhanu Priya
Bhanu Priya
Updated on 16-Mar-2026 514 Views

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 More

HTML DOM Anchor port Property

Ankith Reddy
Ankith Reddy
Updated on 16-Mar-2026 208 Views

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 More

HTML DOM Input Date step Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 345 Views

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 More

How to create a Bibliography with HTML?

Lokesh Badavath
Lokesh Badavath
Updated on 16-Mar-2026 4K+ Views

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 More

HTML DOM Select form Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 261 Views

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 More

HTML DOM Select autofocus Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 194 Views

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 More

HTML DOM Select selectedIndex Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 290 Views

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 More
Showing 13751–13760 of 61,298 articles
Advertisements