Articles on Trending Technologies

Technical articles with clear explanations and examples

HTML DOM readyState Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 232 Views

The DOM readyState property returns the loading status of the current HTML document. This property indicates whether the document is still loading, has finished loading, or has completed loading along with all sub-resources like images and stylesheets. Syntax Following is the syntax for the readyState property − document.readyState Return Value The readyState property returns one of three possible string values − "loading" − The document is still loading content. "interactive" − The document has finished loading and parsing, but sub-resources like images may still be loading. "complete" − The document and ...

Read More

How do we send an email using HTML forms?

Giri Raju
Giri Raju
Updated on 16-Mar-2026 58K+ Views

To send an email using HTML forms, you can use the mailto protocol in the form's action attribute. This method opens the user's default email client with pre-filled information from the form fields. However, this approach has significant limitations and is not recommended for production websites. Syntax Following is the basic syntax for using mailto in HTML forms − The enctype="text/plain" attribute ensures the form data is sent in a readable plain text format rather than URL-encoded format. Basic Email Form Example Following example demonstrates a ...

Read More

How to display a URL which explains the quote/deleted/inserted text in HTML?

Giri Raju
Giri Raju
Updated on 16-Mar-2026 162 Views

The cite attribute in HTML is used to specify a URL that explains the reason for quoting, deleting, or inserting text. This attribute provides additional context and reference information for the content, making it more accessible and informative for both users and search engines. Syntax Following is the syntax for the cite attribute − quoted text quoted content deleted text inserted text The cite attribute accepts a valid URL that points to a source document explaining the quote, deletion, or insertion. Elements That Support the Cite Attribute The cite attribute can be ...

Read More

How to change the text color of an element in HTML?

Daniol Thomas
Daniol Thomas
Updated on 16-Mar-2026 9K+ Views

In HTML, you can change the text color of an element using several methods. While the deprecated tag with the color attribute was used in older HTML versions, modern HTML5 uses CSS for styling text colors through inline styles, internal stylesheets, or external CSS files. Note − The tag and its color attribute are not supported in HTML5 and should be avoided in favor of CSS styling methods. CSS color Property Syntax Following is the syntax for changing text color using CSS − color: value; The value can be specified in ...

Read More

How to make an image responsive in HTML?

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

Responsive images automatically adjust to fit different screen sizes and device dimensions. This ensures that images scale appropriately on desktops, tablets, and mobile devices without breaking the layout or becoming too large or small to view properly. To make an image responsive in HTML, we use the tag combined with CSS properties that control the image's width and height behavior. The key is setting the width to scale with the container while maintaining the image's aspect ratio. Syntax Following are the main CSS properties used to make images responsive − width: 100%; height: auto; ...

Read More

Why do we use reset button in HTML forms?

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

The reset button is used to reset all the input fields in HTML forms to their initial values. It gets added using the tag with the type="reset" attribute. When clicked, it clears any user-entered data and restores all form elements to their original state. The reset button is particularly useful in long forms where users might want to start over without manually clearing each field. It provides a quick way to undo changes and return to the form's default state. Syntax Following is the syntax for the reset button − The ...

Read More

How do we display the visible width of a text area in HTML?

Arjun Thakur
Arjun Thakur
Updated on 16-Mar-2026 246 Views

The cols attribute in HTML is used to specify the visible width of a element. It defines how many average character widths the textarea should display horizontally before text wraps to the next line. Syntax Following is the syntax for using the cols attribute − Content Here, number represents the visible width in characters. The default value is typically 20 characters if not specified. Using the cols Attribute The cols attribute accepts a positive integer value that determines the textarea's width. A higher value creates a wider textarea, while a lower ...

Read More

How to execute the script when the page has finished parsing in HTML?

Rishi Rathor
Rishi Rathor
Updated on 16-Mar-2026 447 Views

The defer attribute in HTML allows scripts to execute only after the HTML document has been completely parsed. This ensures that the script runs when the DOM is ready but before the DOMContentLoaded event fires. Syntax Following is the syntax for using the defer attribute − The defer attribute is a boolean attribute that only works with external scripts (scripts with a src attribute). It has no effect on inline scripts. How the Defer Attribute Works When the browser encounters a script with the defer attribute, it downloads the script in ...

Read More

How to create JLabel to hold multiline of text using HTML in Java?

Samual Sam
Samual Sam
Updated on 16-Mar-2026 1K+ Views

In Java Swing, the JLabel component by default displays only single-line text. To create a JLabel that can hold multiple lines of text, we need to use HTML formatting within the label text. This allows us to use HTML tags like for line breaks and other HTML formatting elements. Syntax Following is the syntax to create a multiline JLabel using HTML − JLabel label = new JLabel("Line1Line2"); For more complex formatting with alignment − JLabel label = new JLabel("Line1Line2", JLabel.LEFT); How It Works When a JLabel's text starts ...

Read More

How to use floating image in HTML page?

Alankritha Ammu
Alankritha Ammu
Updated on 16-Mar-2026 22K+ Views

To use a floating image in HTML, use the CSS float property. It allows you to position an image to the left or right side of its container, causing surrounding text to wrap around the image naturally. Syntax Following is the syntax for the CSS float property − img { float: value; } Alternatively, you can apply it inline − Float Property Values The float property accepts the following values − Property Value Description none Default value. ...

Read More
Showing 13841–13850 of 61,297 articles
Advertisements