HTML Articles

Page 28 of 151

HTML DOM Window closed Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 217 Views

The HTML DOM Window closed property returns a boolean value that indicates whether a window reference is closed or not. This property is particularly useful when working with popup windows opened using window.open(), allowing you to check their state before performing operations. Syntax Following is the syntax for the Window closed property − window.closed Return Value The closed property returns − true − If the window is closed or was never opened false − If the window is currently open Note: For the main browser window, this property always ...

Read More

HTML DOM Window frameElement Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 324 Views

The HTML DOM Window frameElement property returns the HTML element that contains or embeds the current window, such as , , or . If the window is not embedded within another element (i.e., it's the top-level window), this property returns null. This property is commonly used to determine whether a page is running inside a frame or as a standalone window, and to access properties of the parent element when embedded. Syntax Following is the syntax for accessing the frameElement property − window.frameElement Return Value The frameElement property returns − ...

Read More

HTML DOM localStorage Properties

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 286 Views

The HTML DOM localStorage property enables users to store key-value pairs in the browser's local storage for persistent data storage. Unlike session storage, localStorage data remains available until explicitly removed or cleared, even after the browser is closed and reopened. Syntax Following is the syntax to access localStorage − window.localStorage The localStorage object provides several methods for data manipulation − setItem(key, value) − Stores a key-value pair in localStorage getItem(key) − Retrieves the value associated with the specified key removeItem(key) − Removes a specific key-value pair from localStorage clear() − Removes all ...

Read More

HTML DOM Window opener Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 730 Views

The HTML DOM Window opener property returns a reference to the parent window that opened the current window using the window.open() method. This property allows communication between parent and child windows, enabling the child window to access and manipulate elements in its parent window. Syntax Following is the syntax for accessing the opener property − window.opener Return Value The opener property returns − A reference to the parent window object if the current window was opened by another window using window.open(). null if the window was opened directly by the user ...

Read More

Write Emails In HTML and then Send Them using Gmail

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 643 Views

HTML email combines the visual appeal of web pages with email communication, featuring graphics, colors, formatting, and structured layouts. Unlike plain text emails that contain only basic text content, HTML emails resemble newsletters and marketing materials with rich formatting, images, and interactive elements. Email marketers consistently find that HTML emails perform better for conversions compared to plain text. However, creating effective HTML emails requires understanding email client limitations and following specific coding practices to ensure proper rendering across different platforms. What is HTML Email? HTML email uses HyperText Markup Language to create formatted messages that can include ...

Read More

How to allow cross-origin use of images and canvas in HTML?

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 2K+ Views

To allow cross-origin use of images and canvas in HTML, you need to handle CORS (Cross-Origin Resource Sharing) restrictions that browsers enforce for security. When loading images from external domains onto a canvas, the browser marks the canvas as "tainted" unless proper CORS headers are present. Understanding Cross-Origin Issues When you draw an image from a different domain onto a canvas, the browser applies same-origin policy restrictions. This prevents you from reading pixel data or exporting the canvas content using methods like toDataURL() or getImageData(). Cross-Origin Canvas Flow External ...

Read More

How to toggle between one checkbox and a whole group of checkboxes in HTML?

Mohit Panchasara
Mohit Panchasara
Updated on 16-Mar-2026 2K+ Views

The toggling between a single checkbox and a group of checkboxes means that when a user checks one checkbox from a group, all other checkboxes in the group become unchecked, and when the user checks a special "clear" checkbox, all checkboxes in the group get unchecked. This functionality is useful for creating mutually exclusive selections or providing a convenient way to clear multiple checkboxes at once. Syntax Following is the syntax to uncheck all checkboxes in a group using JavaScript − checkboxes.forEach((checkbox) => { checkbox.checked = false; }); Here, checkboxes refers ...

Read More

HTMLCollection for Loop

Mohit Panchasara
Mohit Panchasara
Updated on 16-Mar-2026 7K+ Views

The HTMLCollection is an array-like object containing HTML elements. We can access every element in the collection using its index and iterate through the collection to process all elements one by one using various loop methods. HTMLCollection iteration is commonly used when you need to perform operations on multiple elements. For example, clearing all checkboxes when a user clicks a "Clear All" button, or styling all elements with the same class name. The collection updates automatically when elements are added or removed from the DOM. In this tutorial, we will learn different loop methods to iterate through HTMLCollections ...

Read More

Use of the DFN element type in HTML

Devesh Chauhan
Devesh Chauhan
Updated on 16-Mar-2026 437 Views

The element in HTML represents the defining instance of a term or phrase that is being defined within the content. It stands for Definition and is used to mark the term that is explained or defined in the surrounding text, helping browsers and search engines identify important terminology. Syntax Following is the basic syntax for the element − term The element can also include attributes for enhanced functionality − term abbreviation Key Features of the DFN Element The element has the following characteristics − ...

Read More

Div Layout vs. Table Layout in HTML

Devesh Chauhan
Devesh Chauhan
Updated on 16-Mar-2026 6K+ Views

In HTML, a layout defines the basic structure and appearance of a website. HTML layout is a blueprint that shows us how HTML elements are arranged in a webpage. It provides functionality for creating webpages using simple HTML tags. Two primary approaches exist for creating layouts: div-based layouts and table-based layouts. DIV Layout Div layout is the most common and recommended layout approach in modern HTML, based on elements. The element in HTML is used to define sections of a document. The tag is a container tag with both opening and closing tags. We ...

Read More
Showing 271–280 of 1,509 articles
« Prev 1 26 27 28 29 30 151 Next »
Advertisements