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
HTML onerror Event Attribute
The HTML onerror event attribute is triggered when an error occurs while loading an external file in an HTML document. This attribute is commonly used with , , , and elements to handle loading failures gracefully. Syntax Following is the syntax for the onerror event attribute − Content Where script is JavaScript code that executes when the loading error occurs. Common Use Cases The onerror attribute is typically used in the following scenarios − Image fallback − Display a placeholder image when the original image fails to load Script ...
Read MoreHow do I connect an HTML web page to a database?
HTML is a markup language used for structuring web pages, while databases store and manage data. Connecting HTML web pages to databases enables dynamic content, user interactions, and data-driven applications. This connection is essential for modern web development, allowing websites to display real-time information and respond to user input. HTML provides the structure and presentation layer, while databases handle data storage, retrieval, and manipulation. By connecting them, we create interactive web applications that can store user information, display dynamic content, and provide personalized experiences. Benefits of Connecting HTML Web Page to Database Connecting HTML web pages to ...
Read MoreHTML DOM Input Time stepUp( ) Method
The HTML DOM Input Time stepUp() method is used to increase the value of a time input field by a specified number of minutes. This method provides a programmatic way to increment time values, making it useful for creating time pickers and scheduling interfaces. Syntax Following is the syntax for the stepUp() method − inputTimeObject.stepUp(number) Parameters The stepUp() method accepts one optional parameter − number − An optional integer that specifies the number of minutes to increase the time value. If omitted, the default value is 1. Return Value ...
Read MoreHTML DOM Column object
The HTML DOM Column object represents the HTML element in the Document Object Model. This object allows you to manipulate column properties within HTML tables programmatically. The element is used exclusively within elements to define column properties that can be applied to entire table columns at once. Syntax Following is the syntax for accessing an existing Column object − var columnElement = document.getElementById("columnId"); Following is the syntax for creating a new Column object − var newColumn = document.createElement("COL"); Properties The Column object supports the following key ...
Read MoreHTML onkeydown Event Attribute
The HTML onkeydown event attribute is triggered when a user presses a key on the keyboard. This event fires at the moment a key is pressed down, before the key is released. It is commonly used for capturing keyboard input, creating keyboard shortcuts, and implementing real-time text processing. The onkeydown event occurs in the following sequence: onkeydown → onkeypress → onkeyup. The onkeydown event fires for all keys including function keys, arrow keys, and special keys like Escape or Tab. Syntax Following is the syntax for the onkeydown event attribute − Content Where ...
Read MoreHTML onkeyup Event Attribute
The HTML onkeyup event attribute is triggered when a user releases a key on the keyboard. This event occurs after the onkeydown and onkeypress events, making it useful for capturing the final state of user input after a key has been completely processed. The onkeyup event is commonly used for real-time input validation, live search functionality, character counting, and dynamic content updates as users type. Syntax Following is the syntax for the onkeyup event attribute − Content Where script is the JavaScript code to execute when the key is released. This can be ...
Read MoreAccessing HTML source code using Python Selenium.
We can access HTML source code with Selenium WebDriver using two primary methods. The page_source method retrieves the complete HTML of the current page, while JavaScript execution allows us to access specific portions of the DOM, such as the body content. Syntax Following is the syntax for accessing HTML source using the page_source method − src = driver.page_source Following is the syntax for accessing HTML source using JavaScript execution − h = driver.execute_script("return document.body.innerHTML") Method 1: Using page_source Method The page_source method returns the complete HTML source code of ...
Read MoreHTML onkeypress Event Attribute
The HTML onkeypress event attribute is triggered when the user presses a key on the keyboard while focused on an element. This event is commonly used for input validation, real-time text processing, and creating interactive web forms. Syntax Following is the syntax for the onkeypress event attribute − Content Where script is the JavaScript code to execute when a key is pressed. Parameters The onkeypress event attribute accepts the following parameter − script − JavaScript code or function to execute when the keypress event is triggered. Event Object ...
Read MoreHow to create mail and phone link in HTML?
Creating mailto and tel links in HTML allows users to easily contact you directly from your webpage. A mailto link opens the user's default email client with your email address pre-filled, while a tel link initiates a phone call on mobile devices or opens the default calling application on desktops. Mailto Links A mailto link creates a hyperlink that, when clicked, opens the user's default email client and creates a new email message to a specified email address. Syntax Following is the basic syntax for creating a mailto link − Email Us ...
Read MoreHow do I include a header and footer file on every HTML page?
Including a header and footer on every HTML page is essential for maintaining consistency and improving maintainability across your website. This approach follows the principle of code reusability, allowing you to update common elements in one place and have changes automatically reflected across all pages. There are several methods to achieve this, each with its own advantages depending on your project requirements and server capabilities. Let's explore the most effective approaches for including header and footer files on every HTML page. Server-Side Includes (SSI) Server-Side Includes (SSI) is a web server technology that processes directives in HTML ...
Read More