Selector for Elements Containing Certain Text in CSS

Mohit Panchasara
Updated on 01-Oct-2024 17:14:06

10K+ Views

To select elements containing certain text in CSS, we can use CSS attribute selectors. We can either use pre-defined attribute or we can add custom attribute in the HTML document. In this article, we are having some div element with some attribute, our task is to select elements containing certain text in CSS Approaches to Select Elements Containing Certain Text Here is a list of approaches to select elements containing certain text in CSS which we will be discussing in this article with stepwise explaination and complete example codes. Using Attribute Value Selector ... Read More

Create Animated Counter Using HTML, CSS, and JavaScript

Mayank Agarwal
Updated on 01-Oct-2024 10:39:15

19K+ Views

To create animated counter, we will be using HTML, CSS and Javascript. An animated counter can be described as a display that counts an animation starting from 0 and ending at a specific number. In this article, the initial value of counter is set to 0, our task is to create animated counter using HTML, CSS, and JavaScript. Steps for Creating Animated Counter We will be follwoing below mentioned steps to create animated counter. We have used two div where one div will display the output i.e counter and other div acts as a container. ... Read More

Resize SVG in HTML

Tanya Sehgal
Updated on 01-Oct-2024 10:06:48

391 Views

Every HTML document can contain different image formats, such as PNG, jpeg, SVG, gif, etc. that can be adjusted according to your needs. This article will explore various ways to resize an SVG image in HTML. SVG (Scalable Vector Graphics) is an image format used in web development. It is an XML-based image format that can be scaled to any size without losing its quality. Due to this reason, it is best to use an SVG image for logos and icons. These images are resolution-independent, meaning they can be scaled to any size without losing quality. Resizing ... Read More

Display Upper Triangular Matrix in Java

Shriansh Kumar
Updated on 30-Sep-2024 16:07:07

1K+ Views

In this article, we will understand how to display an upper triangular matrix of a given matrix in Java. A matrix has row and column arrangement of its elements. A matrix with m rows and n columns can be called as m × n matrix. And, the term upper triangular matrix refers to a matrix whose all elements below the main diagonal are 0. Example Scenario: Input: matrix = { 2, 1, 4 }, { 1, 2, 3 }, { 3, 6, 2 } Output: upptri_mat = 2 1 4 0 2 3 0 0 2 Using ... Read More

Convert Positive Integers to Roman Numbers in JavaScript

Nikitasha Shrivastava
Updated on 30-Sep-2024 16:05:43

822 Views

We have to write a JavaScript program to generate the Roman number representation of given integer numbers. The code should accept a positive integer as input and will be able to transform the integer into its equivalent Roman number. Example Scenario: Input: num = 10; Output: roman_num = X How to Convert Integers to Roman Numbers To solve the given problem, define a function to convert an integer to roman. This function will take a positive integer as input and will return the corresponding Roman numeral as a string. It will use an array of objects to map the ... Read More

Check If a Number is Even Without Using the Modulo Operator in JavaScript

Shriansh Kumar
Updated on 30-Sep-2024 16:04:55

1K+ Views

For a given integer number, write a program in JavaScript to check whether a number is odd or even and return the same to the user. It’s pretty easy to check whether a number is even by using the modulo operator. But, in this article, we will be checking whether a number is even or not without using the modulo operator. Using the for loop In this approach, we are going to use the for loop to check whether a number is even or not. The idea is to take a Boolean flag variable as true and check it up ... Read More

JavaScript Knowledge Required for Google Tag Manager

Rushi Javiya
Updated on 30-Sep-2024 16:04:27

812 Views

The Google Tag Manager is a tag management system that allows you to configure and rapidly deploy tags on your website or mobile app using a simple web-based interface. It has the same capabilities as the Google Tag, a JavaScript library used to send data from your website to Google Analytics. Tag Manager also supports tag version management and organization, community and third-party-developed tag templates, enterprise collaboration tools, and security features. JavaScript for Google Tag Manager Before you start using the Google Tag Manager, the following JavaScript topics are necessary for you to learn − Basic Syntax of ... Read More

Check Order of Characters in String in Java

Shriansh Kumar
Updated on 30-Sep-2024 16:03:43

2K+ Views

You are given a String, your task is to write a program in Java that checks the order of its characters. If the order is previously defined, you have to check if the characters are in the given order otherwise check for alphabetical order. Let's understand the problem statement with an example − Example Scenario: Input: str = "abcmnqxz"; Output: res = TRUE The given string is in alphabetical order. Using Iteration In this approach, use a for loop to iterate over the string and check if the value of character at the current place and the previous ... Read More

Sum Odd and Even Indexed Elements in JavaScript

Nikitasha Shrivastava
Updated on 30-Sep-2024 16:03:09

1K+ Views

For a given list of elements, write a JavaScript program to find the sum of its odd and even indexed elements and then, calculate difference between them. To solve this problem, we will first separate odd indexed and even indexed elements. After separating them find their sum separately and store it in different variables. Now, we will calculate the difference between these sums to get desired result. Example Scenario: Input: list = [11, 21, 31, 41, 51, 61]; Output: difference = 30 Here, odd-indexed items are [21, 41, 61] and their sum is 123. The even-indexed items are ... Read More

Find the Middle Element of a Linked List in JavaScript

Shriansh Kumar
Updated on 30-Sep-2024 16:02:06

2K+ Views

For a given linked list, write a program in JavaScript to find its middle element. Here, linked lists are a type of linear data structure. If there are an even number of elements in the linked list, there will be two middle nodes. In this case, the middle element would be the latter element out of both elements. Example Scenario: Input: linked_list = 1->2->3->4->5->6-> null Output: middle_element = 4 Using Iteration Iterate over the whole list and count the number of nodes. Now, iterate over the node till count/2 and return the count/2 i.e. the middle element. Example ... Read More

Advertisements