AmitDiwan has Published 10744 Articles

Get and Set CSS Variables with JavaScript

AmitDiwan

AmitDiwan

Updated on 28-Oct-2024 14:54:50

14K+ Views

To get and set CSS variables with JavaScript, we can use various methods. The getComputedStyle() method gives an object which includes all the styles applied to the target element. The getPropertyValue() method is used to obtain the desired property from the computed styles. The setProperty() method is used to change ... Read More

How to Create a Register Form with CSS?

AmitDiwan

AmitDiwan

Updated on 24-Oct-2024 12:05:03

5K+ Views

To create a register form with CSS, we will be using HTML forms. A registration form includes name, email, password, contact and other type of information collected from a user. It consists of input fields, buttons and other form elements which can be easily created using form tag. In this ... Read More

Java program to remove all duplicates words from a given sentence

AmitDiwan

AmitDiwan

Updated on 23-Oct-2024 17:29:44

977 Views

In this article, we will learn to remove duplicate words from a given sentence in Java. The first method uses Java Streams to remove duplicates and join the words back into a sentence using the distinct() and Collectors.joining() methods. The second method uses a Set to automatically filter out duplicate ... Read More

How to Iterate Elements by ClassName in JavaScript?

AmitDiwan

AmitDiwan

Updated on 21-Oct-2024 18:03:56

11K+ Views

To iterate elements by className in JavaScript, we will be using getElementsByClassName() method. It is used for getting the collection of all the elements in the document with specified classname. In this article we are having three div elements each having same class name. Our task is to iterate elements ... Read More

Java program to find the area of a parallelogram

AmitDiwan

AmitDiwan

Updated on 21-Oct-2024 11:06:11

591 Views

In this article, we will understand how to find the area of a parallelogram using Java. A parallelogram has two pairs of parallel equal opposite sides. It has a base and a height which is the perpendicular distance between the base and its opposite parallel side. The area of a ... Read More

Java program to rotate matrix elements

AmitDiwan

AmitDiwan

Updated on 16-Oct-2024 16:27:40

1K+ Views

In this article, we will understand how to rotate matrix elements using Java. A matrix is a representation of the elements in rows and columns. Matrix rotation is shifting the position of each element of the matrix by 1 position towards its right or left. We will be using two approaches: ... Read More

Java code to print common characters of two strings in alphabetical order

AmitDiwan

AmitDiwan

Updated on 15-Oct-2024 11:52:18

2K+ Views

In this article, we will learn to print common characters of two strings in alphabetical order using Java. The program uses arrays to count how often each letter appears in both strings and then compares these counts to identify the common characters. Problem Statement Write a Java program to print common ... Read More

Java program to print X star pattern

AmitDiwan

AmitDiwan

Updated on 15-Oct-2024 10:42:14

12K+ Views

In this article, we will understand how to print X star pattern using Java. The pattern is formed by using multiple for-loops and print statements. The pattern forms the shape of the letter "X" by printing stars ('X') and spaces in specific positions. The user can provide a number as ... Read More

Setting a Fixed Width for Items in CSS Flexbox

AmitDiwan

AmitDiwan

Updated on 04-Oct-2024 17:14:38

4K+ Views

To set a fixed width for items in CSS flexbox, we will be understanding two different approaches. It is useful when you want some specific items to have a fixed width even if there is space available. In this article, we are having three div items wrapped inside a div ... Read More

How to create a responsive form with CSS?

AmitDiwan

AmitDiwan

Updated on 03-Oct-2024 15:38:26

5K+ Views

To create a responsive form with CSS, we will be using HTML form elements such as HTML input tag with type attribute and label. We will design the created form using CSS properties and make it responsive using media queries. We will be undersatanding stepwise process of creating responsive form ... Read More

Previous 1 ... 4 5 6 7 8 ... 1075 Next
Advertisements