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
Front End Technology Articles
Page 97 of 652
How to merge table columns in HTML?
To merge table columns in HTML, use the colspan attribute in the or tag. This attribute allows a cell to span across multiple columns, effectively merging them together. The value of colspan specifies how many columns the cell should span. Syntax Following is the syntax for merging table columns using the colspan attribute − Content Content Where number represents the number of columns the cell should span across. Basic Table Structure Let us first create a basic 3x3 table to understand the structure before applying column merging − ...
Read MoreHow to set Heading alignment in HTML?
Headings are the titles or subtitles of the content that you want to display on the web page. Headings help us to get an idea of the content on the web page. Headings and subheadings represent the key concepts ideas and supporting ideas in the content of the web page. HTML has different levels of heading tags from to . Heading alignment refers to the horizontal positioning of heading text within its container. In modern HTML, we align headings using the CSS text-align property with the style attribute, as the deprecated align attribute is no longer recommended. ...
Read MoreHow to set cell padding in HTML?
In HTML, cell padding refers to the space between the cell borders and the content inside table cells. We can set cell padding using CSS properties like padding applied through inline styles, internal stylesheets, or external CSS files. Cell padding improves table readability by providing breathing space around cell content. Syntax Following is the syntax to set cell padding in HTML using inline styles − Header Content Cell Content Following is the syntax using CSS selectors − th, td { padding: value; } The value can be ...
Read MoreHow to limit an HTML input box so that it only accepts numeric input?
In this article, we will learn how to limit an HTML input box so that it only accepts numeric inputs. The most effective way to restrict input to numbers is using . This creates a numeric input field that automatically validates user input and provides built-in controls like spinner buttons. Additionally, we can use attributes like min, max, and step to further control the allowed numeric values. Syntax Following is the basic syntax to create a numeric input field − Following is the syntax with additional attributes for range control − ...
Read MoreHow to set background image of a webpage?
Beautiful webpages are a very strong means of catching user attention. In this article, we are going to see how we can add an image as the background image of a web page using HTML and CSS approaches. Methods to Set Background Image There are two primary approaches to setting an image as the webpage's background image − Using background attribute − The traditional HTML approach (deprecated in HTML5) Using CSS background-image property − The modern and recommended approach Method 1: Using Background Attribute The background attribute can be used in the ...
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 set cell width and height in HTML?
In HTML tables, cell width and height can be controlled using CSS styling. The most common approach is to use inline CSS with the style attribute on (table data) or (table header) elements. You can specify dimensions in pixels, percentages, or other CSS units. Syntax Following is the syntax for setting cell width and height using inline CSS − Content You can also apply dimensions to header cells − Header Here, value can be specified in pixels (px), percentages (%), em units, or other CSS measurement units. ...
Read MoreHow to automatically redirect a Web Page to another URL?
Page redirection is a technique where visitors clicking on a URL are automatically directed to a different page than originally intended. This happens seamlessly in the background and is commonly used for moving content, temporary maintenance pages, or directing users to updated URLs. To redirect from an HTML page, use the meta tag with the http-equiv attribute. This attribute provides an HTTP header for the value of the content attribute, which specifies the number of seconds to wait before redirecting and the destination URL. Syntax Following is the syntax for HTML page redirection using the meta tag ...
Read MoreHow to use datetime input type in HTML?
The datetime-local input type in HTML allows users to select both date and time using a built-in date and time picker. This input type creates a form control that displays a calendar and time selector when clicked, making it easy for users to enter accurate date-time values. Syntax Following is the syntax for the datetime-local input type − The value format follows the ISO 8601 standard: YYYY-MM-DDTHH:MM where the T separates the date and time components. Basic Example Following example demonstrates how to use the datetime-local input type in a form ...
Read MoreHow to clear all the input in HTML forms?
Using HTML forms, you can easily take user input. The tag is used to get user input by adding form elements. Different types of form elements include text input, radio button input, submit button, etc. To clear all the input in an HTML form, you have several methods available. The most common approaches include using the reset input type, JavaScript's getElementById() method, or direct onclick events. Each method serves different scenarios depending on whether you want to clear individual fields or all form data at once. Method 1 − Using JavaScript getElementById() The getElementById() method allows ...
Read More