
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2202 Articles for HTML

6K+ Views
The HTML collection is an array of HTML elements. We can access every element of the collection using its index. Also, we can iterate through the array of HTML collections and get all HTML elements of the collection one by one. Sometimes, we require to use for loop to iterate through the collection of all HTML elements. For example, we have created a group of checkboxes, and when the user presses the clear button, we require to clear all checkboxes. We can access all checkboxes in the HTML collection, iterate through it, and uncheck every checkbox. In this tutorial, ... Read More

2K+ Views
The toggling means that whenever a user checks a single checkbox, all checkboxes of the group should be unchecked, and when a user checks any checkbox from the group, a single checkbox should be unchecked. We can achieve this functionality with JavaScript. In this tutorial, we will learn to toggle between one checkbox and a whole group of checkboxes in HTML. Syntax Users can follow the syntax below to toggle between one checkbox and a whole group of checkboxes in HTML. checkboxes.forEach((checkbox) => { checkbox.checked = false; }) In the above syntax, checkboxes is ... Read More

581 Views
We will cover the process of creating a canvas element in the HTML document, selecting it in JavaScript code, and using the clearRect method to clear the entire canvas or a specific area of it. This is a useful technique for creating dynamic and interactive graphics in HTML, and we will walk user through the steps needed to implement it in your own projects. In this tutorial, we will be discussing how to clear the canvas using the clearRect method in HTML. Clearing Canvas with clearRect Users can follow the steps below to clear the canvas using clearRect Step 1 ... Read More

2K+ Views
To allow cross-origin use of images and canvas, the server must include the appropriate CORS (Cross-Origin Resource Sharing) headers in its HTTP responses. These headers can be set to allow specific origins or methods, or to allow any origin to access the resource. HTML Canvas An HTML5 Canvas is a rectangular area on a web page that is controlled by JavaScript code. Anything can be drawn on the canvas, including images, shapes, text, and animations. The canvas is a great tool for creating games, graphics, and web applications. Approach The approach to allow cross-origin use of images and canvas is ... Read More

103K+ Views
We can adjust the width and height of an iframe by using CSS to set the dimensions. This can be done by setting the width and height properties to a specific value or to a percentage of the parent container. Additionally, we can use JavaScript to dynamically adjust the dimensions based on the content within the iframe. The term iframe is short for Inline frame. Here are the possible approaches − Using JavaScript You can use JavaScript to adjust the width and height of an iframe to fit its content. This can be done by getting the element of the ... Read More

7K+ Views
In today's digital age, many of us are relying on technology more than ever to help us work and communicate efficiently. With so many different file formats to choose from, it can be hard to know which one you should use. Two of the most popular formats are Rich Text Format (RTF) and HyperText Markup Language (HTML). RTF is a file format that allows for basic text formatting, such as bold, italics, underlining, and font size/color. RTF files can be opened in any word processing program, such as Microsoft Word or Google Docs. HTML is a code used to create ... Read More

13K+ Views
To add line breaks to an HTML textarea, we can use the HTML line break tag to insert a line break wherever we want. Alternatively, we can also use the CSS property "white-space: pre-wrap" to automatically add line breaks to the text. This is particularly useful when displaying pre-formatted text in a textarea. Therefore, let’s discuss the approach for adding the line breaks. Approach Create a textarea in HTML and assign an id to it. Create a button which when clicked will split the textarea’s text using newline. Now create the function which will break the text into newline. ... Read More

11K+ Views
To add a “PRINT” button on your HTML webpage which, when clicked, prints the whole webpage. This is a fairly simple functionality to add in a webpage and can be added using some HTML elements and plain JavaScript. Therefore, let us discuss the approach for doing so. Approach Firstly, add a tag inside the HTML dom. Assign its type attribute to “button” and give it some value. Then assign an “onclick” handler to the input which will be handled using JavaScript. The function that handles the click event of input tag will look like this − const ... Read More

13K+ Views
To add multiple font files for the same font using CSS, is essential to display your webpage correctly across all devices. For this purpose it is important to include multiple font files for the same font. In this article, we will be understanding two different approaches to add multiple font files for the same font using CSS. Approaches to Add Multiple Font Files for Same Font Here is a list of approaches to add multiple font files for the same font using CSS which we will be discussing in this article with stepwise explaination and complete example codes. ... Read More

16K+ Views
Introduction In this article, we will show you how to add icons to your buttons in HTML. Icons are a great way to add visual appeal and enhance the usability of your buttons. They can be used to indicate the type of action a button will perform or make it easier for users to understand the function of a button. Approaches There are several ways to add icons to buttons in HTML, and in this article, we will cover two of the most popular methods − Using font libraries Using image files. Approach 1: Using Font Libraries One ... Read More