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 link pages using absolute URL in HTML?
An absolute URL in HTML is a complete web address that includes the full path to a resource, including the protocol (http/https) and domain name. Unlike relative URLs, absolute URLs provide the complete location of a resource and can be used to link to external websites or specific pages within the same site. What is an Absolute URL? An absolute URL contains all the information needed to locate a resource on the web. It includes − Protocol − Such as http:// or https:// Domain name − The website address like www.example.com Path − The specific location ...
Read MoreExecute a script when a user navigates to a page in HTML?
The onpageshow event in HTML allows you to execute a script whenever a user navigates to a page. This event fires every time a page loads, including when users navigate back using the browser's back button or reload the page. HTML onpageshow Event The onpageshow event occurs when a user navigates to a webpage. Unlike the onload event, onpageshow fires even when the page is loaded from the browser cache, making it ideal for initialization scripts that need to run every time the page is displayed. Syntax Following is the syntax for the onpageshow event in ...
Read MoreHTML DOM Input Email value Property
The HTML DOM Input Email value property allows you to get or set the value of an email input field. This property returns a string representing the current email address in the input field, and you can also assign a new email string to change the field's value programmatically. Syntax Following is the syntax for getting the email input value − inputEmailObject.value Following is the syntax for setting the email input value − inputEmailObject.value = "emailString" Return Value The value property returns a string that represents the current value ...
Read MoreHow to Change the Color of Links in HTML?
HTML links are hyperlinks that connect one web page to another. By default, links appear in specific colors: unvisited links are blue and underlined, visited links are purple and underlined, and active links are red and underlined. However, we can customize these colors using CSS to match our website's design. Syntax Following is the basic syntax for creating HTML links − Link text To change link colors, we use CSS pseudo-classes with the following syntax − a:link { color: colorname; } /* Unvisited link */ a:visited { ...
Read MoreHow to set the URL of the media file in HTML?
In this article, we are going to learn about how to set the URL of the media file in HTML using the element. This element allows you to specify multiple media sources with different formats, enabling browsers to choose the most suitable format they support. The element is used inside , , and elements to provide alternative media resources. By offering multiple formats, you ensure better cross-browser compatibility and optimal media delivery across different devices and platforms. Syntax Following is the syntax for the element − The src ...
Read MoreHow to remove underline from a link in HTML?
By default, HTML links are displayed with an underline to indicate they are clickable. However, you can remove this underline using the text-decoration CSS property. The most common approach is to use an inline style attribute directly on the link element. Syntax Following is the syntax to remove underline from a link using inline CSS − Link Text You can also use internal or external CSS to apply this style to multiple links − a { text-decoration: none; } Using Inline Style The inline style method applies the text-decoration: ...
Read MoreExecute a script when the user pastes some content in an element in HTML?
In this article, we are going to execute a script when the user pastes content into an element in HTML. The onpaste event is triggered when a user pastes content into an element, making it useful for validation, formatting, or tracking paste operations. Although all HTML elements accept the onpaste event, you cannot actually paste content into elements like or unless they have the contenteditable attribute set to "true". Most commonly, the onpaste event is used with elements of type="text" and elements. Syntax Following is the syntax for using the onpaste event in ...
Read MoreHow to change the target of a link in HTML?
The target attribute of the tag controls where a link opens when clicked. This attribute allows you to specify whether the link should open in the same window, a new tab, or in specific frames within a frameset. Syntax Following is the syntax to change the target of a link in HTML − Link text Target Attribute Values The target attribute accepts the following values − _blank − Opens the link in a new tab or window. _self − Opens the link in the current tab or window (default behavior). ...
Read MoreHow to specify the HTML content of the page to show in the <iframe> in HTML?
In this article, we need to display the HTML content of the page in an iframe; a browser window divided as a separate page. We can achieve this task using the tag and its srcdoc attribute. HTML Tag The tag in HTML specifies an inline frame. This inline frame is used to embed another document within the current HTML document. This tag is supported by all modern browsers including Google Chrome, Microsoft Edge, Firefox, Safari, and Opera. The srcdoc attribute of the tag is used to specify the HTML content of the page ...
Read MoreHTML DOM Input Checkbox disabled Property
The HTML DOM Input Checkbox disabled property sets or returns whether a checkbox input element is enabled or disabled. When a checkbox is disabled, it cannot be clicked or modified by the user and appears grayed out in the browser. Syntax Following is the syntax for returning the disabled state − inputCheckboxObject.disabled Following is the syntax for setting the disabled state − inputCheckboxObject.disabled = booleanValue Return Value The disabled property returns a boolean value indicating whether the checkbox is disabled (true) or enabled (false). Parameters The booleanValue ...
Read More