The HTML DOM Input password type property is associated with input elements that have type="password". This property returns the string "password" when accessed on a password input field. It is a read-only property that identifies the input type. Syntax Following is the syntax for accessing the password type property − passwordObject.type Return Value The type property returns a string value "password" for input elements with type="password". Example − Getting Input Type Following example demonstrates how to retrieve the type of a password input field − ... Read More
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 More
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 More
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 More
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 More
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 More
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 More
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 More
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 More
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 More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Economics & Finance