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
How to make page links in HTML Page?
A link is a connection from one web page to another web page. We can add page links to a web page using HTML links, which are hyperlinks. The tag defines a hyperlink and is used to link from one page to another. The href attribute is used with the tag, which indicates the link's destination. To create page links in an HTML page, we need to use the href attribute of the and tag. Make sure that the tag is placed within the … tags. The link text is visible. Clicking on ...
Read MoreHow to add a layer in HTML?
The concept of layers in HTML refers to creating overlapping elements that can be positioned and stacked on top of each other. While the obsolete tag was once used for this purpose, modern HTML uses elements with CSS positioning and z-index properties to create layered content. Important Note: The tag is deprecated and not supported in modern browsers. It was a Netscape-specific element that never became part of the HTML standard. Instead, we use CSS positioning with elements to achieve layering effects. Modern Approach: Creating Layers with CSS To create layers in modern ...
Read MoreExecute a script after the document is printed in HTML?
The onafterprint event attribute in HTML executes a JavaScript function after the user has printed the document or closed the print preview dialog. This event is useful for tracking print actions, cleaning up resources, or providing user feedback after printing. Syntax Following is the syntax for the onafterprint attribute − You can also use it with JavaScript event listeners − window.addEventListener("afterprint", functionName); Using onafterprint Attribute The onafterprint attribute is typically added to the element and triggers when the print dialog is closed, regardless of whether the user ...
Read MoreHTML DOM Input Date autofocus Property
The HTML DOM Input Date autofocus property sets or returns whether a date input field should automatically receive focus when the page loads. This property corresponds to the autofocus HTML attribute. Syntax Following is the syntax for getting the autofocus property − inputDateObject.autofocus Following is the syntax for setting the autofocus property − inputDateObject.autofocus = booleanValue Return Value The autofocus property returns a boolean value − true − If the date input has the autofocus attribute set false − If the date input does not have the ...
Read MoreHow to Insert an Image in HTML Page?
To insert an image in HTML page is a very common and easy task that enhances the appearance of any web page. It makes a web page look more attractive and visually engaging. In this article, we will explore three different approaches to insert an image in HTML page using HTML tags and CSS properties. Each method serves different purposes and offers unique advantages depending on your specific requirements. Approaches to Insert an Image in HTML Page Here is a list of approaches to insert an image in HTML page which we will be discussing in this ...
Read MoreHow to add a resource reference in HTML?
In HTML, the tag is used to add a resource reference. The link defines the relationship between the external document and current document. It is an empty element that only contains attributes and must be placed within the section of an HTML document. The tag is commonly used to link external style sheets, add favicons to websites, preload resources, and establish relationships with other documents. The tag consists of various attribute values that define the type and location of the referenced resource. Syntax Following is the basic syntax for the tag − ...
Read MoreHTML DOM Input Date disabled Property
The HTML DOM Input Date disabled property controls whether a date input field is enabled or disabled. When disabled is set to true, the date input becomes unresponsive to user interaction and appears grayed out. This property is useful for conditionally enabling or disabling date selection based on application logic. Syntax Following is the syntax for getting the disabled state − inputDateObject.disabled Following is the syntax for setting the disabled state − inputDateObject.disabled = booleanValue Parameters The disabled property accepts a boolean value − Value ...
Read MoreHow to add a list item in HTML?
To add a list item in HTML, use the tag. It can be used inside ordered lists (), unordered lists (), and menu lists (). In an ordered list, the list items are displayed with numbers or letters. In an unordered list and menu list, the list items are displayed with bullet points. Syntax Following is the syntax for the list item tag in HTML − Content The tag must be placed inside a list container like , , or . Attributes The tag supports the following specific attributes ...
Read MoreExecute a script when a context menu is triggered in HTML5?
The contextmenu attribute in HTML5 allows you to execute a script when a context menu is triggered. A context menu appears when a user right-clicks on an element. This attribute links an element to a custom element that defines the context menu options. Syntax Following is the syntax for the contextmenu attribute − Content The contextmenu attribute value must match the id of a element with type="context". Basic Context Menu Example Following example demonstrates how to create a basic context ...
Read MoreHTML DOM Input Date form Property
The Input Date form property returns a reference to the form element that contains the input date field. This property is read-only and provides access to the enclosing form object, allowing you to retrieve form attributes like ID, action, or method through JavaScript. Syntax Following is the syntax for accessing the form property − inputDateObject.form Return Value The form property returns a reference to the form element that contains the input date field. If the input date is not inside a form, it returns null. Example − Getting Form Reference Following ...
Read More