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
Web Development Articles
Page 74 of 801
How do we include an inline sub window in HTML?
An inline sub window in HTML is created using the (inline frame) tag. An iframe allows you to embed another HTML document or webpage directly within the current page, creating a window-like container that displays external content seamlessly. The iframe element is commonly used to embed videos, maps, social media content, advertisements, or entire web pages from the same or different domains. It acts as a separate browsing context within the main document. Syntax Following is the basic syntax for creating an inline sub window using the iframe tag − The ...
Read MoreHow to add an inline layer in HTML?
The tag was a non-standard HTML element introduced by Netscape Navigator to create inline layers that occupy space within the normal text flow. Unlike the tag which positioned content above the text flow, created layers that pushed subsequent content after the space they occupied. Important: The tag is obsolete and deprecated. It was never part of the HTML standard and was only supported by Netscape Navigator 4.x. Modern browsers do not support this tag, and it should not be used in contemporary web development. Syntax The basic syntax for the tag was ...
Read MoreHow do we add a sample computer code in HTML?
Use the tag to display a sample computer code. The HTML tag is used to display the output of a computer program or sample text that would appear on a computer screen, such as command-line output, error messages, or program responses. Syntax Following is the syntax for the tag − Sample computer output The tag is an inline element that typically displays its content in a monospace font, making it visually distinct from regular text. Basic Example Following example shows how to use the tag to display ...
Read MoreHow to create a section in a document in HTML?
Use the tag to add a section in a document. The HTML tag is used for defining a section of your document. With the div tag, you can group large sections of HTML elements together and format them with CSS. Syntax Following is the basic syntax for the tag − Content goes here The tag is a block-level container element that creates a rectangular section on the page. It serves as a wrapper for other HTML elements and provides a way to apply CSS styles ...
Read MoreHow do we add a push button to HTML?
Use the tag in HTML to add a push button. The HTML tag is used for creating a button within HTML forms or as standalone interactive elements. You can also use the tag to create similar buttons, but the tag offers more flexibility as it can contain HTML content like images, text formatting, and other elements. Syntax Following is the basic syntax for the tag − Button Content The button content can be plain text, HTML elements, or a combination of both. Button ...
Read MoreHow to specify citation in HTML?
The tag in HTML is used to specify citations or references to creative works such as books, articles, movies, songs, or research papers. The content within the tag typically appears in italics by default in most browsers, indicating that it represents the title of a referenced work. Syntax Following is the syntax for the tag − Title of the work The tag is an inline element that should contain only the title of the work being referenced, not the author's name or additional descriptive text. Basic Citation Example ...
Read MoreExecute a script when the user opens or closes the element in HTML?
The ontoggle event in HTML is triggered when a user opens or closes the element. This event allows you to execute JavaScript functions whenever the disclosure state of a details element changes, making it useful for tracking user interactions or updating content dynamically. Syntax Following is the syntax for the ontoggle event attribute − Summary text Content to be shown/hidden The ontoggle event fires both when the details element is opened (expanded) and when it is closed (collapsed). Basic Example Following example demonstrates ...
Read MoreExecute a script when a Web Storage area is updated in HTML?
The onstorage attribute in HTML is used to execute a script when the Web Storage area (localStorage or sessionStorage) is updated. This event is triggered when storage data changes in another window or tab of the same origin, making it useful for synchronizing data across multiple browser windows. Syntax Following is the syntax for the onstorage attribute − The onstorage event is typically attached to the element and fires when: Another window or tab modifies localStorage Another window or tab modifies sessionStorage Storage items are added, modified, or removed from ...
Read MoreExecute a script when the media is ready to start playing in HTML?
The oncanplay event in HTML is triggered when the browser has enough data to start playing a media element (audio or video) but may need to stop for further buffering. This event is essential for executing scripts when media becomes playable. Syntax Following is the syntax for the oncanplay event attribute − ... ... You can also use the addEventListener method in JavaScript − element.addEventListener("canplay", function() { // Your code here }); Using oncanplay with Video Element The oncanplay event is commonly used with video ...
Read MoreExecute a script when the playback position of the media has changed in HTML?
The ontimeupdate event in HTML triggers whenever the playback position of a media element changes. This event fires continuously during media playback, including when users seek to different positions, fast forward, rewind, or during normal playback progression. Syntax Following is the syntax for the ontimeupdate event attribute − You can also add the event listener using JavaScript − mediaElement.addEventListener('timeupdate', functionName); How It Works The ontimeupdate event fires approximately every 250 milliseconds during media playback, but this frequency may vary depending on the browser and system performance. The ...
Read More