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 do we set what value is the optimal value for the gauge in HTML?
The optimum attribute in HTML's element defines the optimal or ideal value for a gauge. This attribute helps browsers determine the best visual representation of the meter by indicating what range of values should be considered "good" or preferred. The element, also known as a gauge, displays scalar measurements within a defined range. The optimum attribute works alongside other attributes like low and high to create visual zones that indicate whether the current value is in a good, average, or poor range. Syntax Following is the syntax for the optimum attribute in the meter element ...
Read MoreHTML DOM Superscript Object
The HTML DOM Superscript Object represents the element in an HTML document. The superscript element displays text as superscript, which appears half a character above the normal line and is often rendered in a smaller font size. This is commonly used for mathematical exponents, footnote references, and ordinal numbers. Syntax Following is the syntax to create a superscript object using JavaScript − document.createElement("SUP"); Properties The Superscript object inherits all properties from the generic HTMLElement object, including − innerHTML − Gets or sets the HTML content inside the superscript element. textContent ...
Read MoreWhy do we use DOCTYPES in HTML document?
The DOCTYPE declaration is a document type definition that informs the web browser about the version of HTML or markup language used in a document. It serves as an instruction to the browser on how to interpret and render the HTML content correctly. Without a proper DOCTYPE, browsers may enter "quirks mode, " leading to inconsistent rendering across different browsers. Syntax Following is the syntax for the modern HTML5 DOCTYPE declaration − For older HTML versions, the DOCTYPE syntax was more complex and required DTD (Document Type Definition) references − ...
Read MoreHow to display a short hint that describes the expected value of the element in HTML?
The placeholder attribute in HTML displays a short hint that describes the expected value of an input element. This hint appears inside the input field when it is empty and disappears when the user starts typing. It provides users with guidance on what type of information to enter without taking up additional screen space. Syntax Following is the syntax for the placeholder attribute − The placeholder text should be concise and descriptive, helping users understand the expected input format or content. Supported Elements The placeholder attribute works with the following HTML ...
Read MoreHow to use Python Regular expression to extract URL from an HTML link?
In this article, we will learn how to extract URLs from HTML links using Python regular expressions. A URL (Uniform Resource Locator) identifies the location of a resource on the Internet, consisting of components like protocol, domain name, path, and port number. Python's re module provides powerful regular expression capabilities for parsing and extracting URLs from HTML content. Regular expressions allow us to define search patterns that can identify and extract specific URL formats from text. Regular Expressions in Python A regular expression is a search pattern used to find matching strings in text. Python's re module ...
Read MoreHow to redirect from an HTML page?
Page redirection is a situation where you click a URL to reach page X, but internally you are directed to another page Y. This happens due to page redirection mechanisms. Website developers use redirection when they need to move content to a new location, restructure their site, or temporarily redirect users during maintenance. To redirect from an HTML page, we use the META tag with the http-equiv="refresh" attribute. This provides an HTTP header that tells the browser to automatically redirect after a specified time delay. Syntax Following is the syntax for HTML page redirection − ...
Read MoreHow to add a regular expression that an input element's value is checked against in HTML?
The pattern attribute in HTML allows you to specify a regular expression that validates an input element's value before form submission. This attribute provides client-side validation by checking if the entered value matches the specified pattern. The pattern attribute works with input types including text, password, email, search, url, and tel. When a user submits a form, the browser automatically validates the input against the pattern and displays an error message if the value doesn't match. Syntax Following is the syntax for the HTML pattern attribute − Where regular_expression is a ...
Read MoreHTML DOM Input Number form Property
The HTML DOM input number form property returns a reference to the form element that contains a specific number input field. This property is read-only and provides access to the parent form element, allowing you to manipulate form properties or access other form elements programmatically. Syntax Following is the syntax for the input number form property − numberInputObject.form Return Value This property returns a reference to the element that contains the number input field. If the number input is not inside a form, it returns null. Example − Basic Form Reference ...
Read MoreHTML DOM Table Object
The HTML DOM Table Object represents the element in HTML. It provides properties and methods to dynamically create, modify, and manipulate table elements using JavaScript. This object allows developers to programmatically interact with tables without directly modifying HTML markup. Syntax To create a new table object using JavaScript − document.createElement("TABLE"); To access an existing table element − document.getElementById("tableId"); document.getElementsByTagName("table")[0]; Properties The DOM Table Object provides the following key properties − Property Description caption Returns or sets the element of ...
Read MoreHow do we set an image to be shown while the video is downloading in HTML?
In this article we are going to learn about how to set an image to be shown while the video is downloading in HTML using the poster attribute. The HTML poster attribute allows developers to display a custom image before the video starts playing. This image is shown while the video is downloading or until the user clicks the play button. If the poster attribute is not specified, the browser displays the first frame of the video as the default thumbnail. Syntax Following is the syntax for the HTML poster attribute − ...
Read More