Creating a Dropdown List To create a drop-down list in HTML, we use the tag, which is generally used in forms to collect user input. To refer to the form data after submission, we use the name attribute. Without the name attribute, no data will be collected from the drop-down list. To associate the drop-down list with a label; the id attribute is needed. To define options in the drop-down list, use the tag inside the element. Syntax Following is the usage of tag in HTML - ... Read More
Clickable Areas in HTML To create clickable areas within an image, we use an image map, which is defined using the tag, with both opening and closing tags: . An image is a list that coordinates specific areas of an image, allowing different parts of the image to be hyperlinked to various destinations. These maps enable the server-side image web browser to send information to the server about where the user clicks within an image. Client-side image maps do not require any special logic to be executed on the server, as they do not need any JavaScript. ... Read More
To implement left rotation and right rotation of a string, we can use various approaches to implement this problem. Left rotation of a string means anti-clockwise movement of the given number of characters and right rotation of the string means clockwise movement of the given number of characters. In this article we are having a string and a value of k by which we will rotate the string. Our task is to write a JavaScript program for left rotation and right rotation of a string. Example Input: String str = "apple"; k = 3 Output: Left Rotation: ... Read More
Technology has grown exponentially in the last few decades. Additionally, technological use is on the rise. It has an impact on people's lives; technology affects their communication, learning, and thought processes. It has a significant impact on society, and it is difficult to see modern life without technology. Society and technology are interrelated, linked, and mutually beneficial. In both positive and negative ways, technology affects society, including its ability to advance or decline. Impact of Technology on Society Since technological systems like computers, TVs, and cell phones are created by humans and represent the demands and lifestyle of a population, ... Read More
To visually demonstrate the completion of task or goal, we use the element. The max and value attributes show the progress made towards task completion. The element offers a visual representation of the completion status of task. It's typically displayed as a progress bar, indicating how much of a particular task has been completed. Here is the syntax for the tag in HTML − The element has both opening and closing tags. It is a new semantic element in HTML5. This progress bar id also used to display the progress of file being uploaded. ... Read More
Depth First Search (DFS) is an algorithm that traverses a graph, visiting all nodes before backtracking. It can also determine whether a path exists between two nodes. DFS begins at the root node and explores as far as possible along each branch before backtracking. DFS searches a graph or tree in a depth-wise manner. Algorithm Given below is an algorithm for the implementation of the Depth First Search (DFS) − Step 1 − Initially stack is empty. ... Read More
A calculator is a simple tool that helps us to calculate mathematical operations easily and quickly. A basic calculator can perform simple arithmetic operations like subtraction, addition, multiplication, and division. Begin by writing the C code to create a simple calculator. Then, follow the algorithm given below to write a C program. Algorithm Step 1: Declare variables Step 2: Enter any operator at runtime Step 3: Enter any two integer values at runtime Step 4: Apply switch case to select the operator: // case '+': result = num1 + num2; ... Read More
To check if strings are rotations of each other or not, it means that two strings can be rotated to either the right or left direction to obtain the other string. In the right rotation characters of the string shift to their following index and for the zeroth index, it takes the character of the last index assuming the string is in a circle. Left rotation is similar to right rotation but in the opposite direction. In this article We are having two strings and we have to write a JavaScript program to check whether by rotating the characters of ... Read More
In this article, we will learn to reverse an array in Java. Reversing an array is a classic problem that helps understand essential concepts like data structures and in-place manipulation. This operation is commonly required in programming tasks, such as data transformations, algorithm implementations, and solving logical problems. Problem Statement Reversing an array involves rearranging its elements so that the first element becomes the last, the second becomes the second-to-last, and so on. Input int[] myArray = {23, 93, 56, 92, 39}; Output {39, 92, 56, 93, 23} Different Approaches Following are the two different approaches to reverse an array ... Read More
In this article, we will learn to create an array from JSON data in JavaScript. JSON is a widely used format for storing and exchanging data. A common use case involves extracting specific data from a JSON object or array and converting it into a separate array for further processing. What is JSON Data? JSON (JavaScript Object Notation) is a lightweight data format commonly used to store and exchange data between a server and a client. It represents data as key-value pairs and is easy for both humans and machines to read and write. In JavaScript, JSON objects or arrays can be ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP