Change the Color of Selected Text Using CSS

Shabaz Alam
Updated on 22-Aug-2024 10:37:00

7K+ Views

To change the color of selected text using CSS, is a simple task which can be achieved using ::selection psuedo element. In this article, we are having text content which are written using various HTML tags, our task is to change the color of selected text using CSS. Changing color of selected text using CSS In example 1, we are having a div element, an H3 element and a p element with some text written in it. We have used "::selection" pseudo-element selector which changes the background-color and text color of ... Read More

Style Label for Selected Radio Input and Checked Checkboxes Using CSS

Tarun Singh
Updated on 21-Aug-2024 17:12:51

4K+ Views

To style label associated with selected radio input and checked checkboxes using CSS, is important task in forms as it makes it easy to identify the option selected by user. In this article, we will understand how to style label associated with selected radio input and checked checkboxes using CSS using :checked psuedo class selector and CSS combinators. We are having three radio buttons and three checkboxes, our task is to style label associated with selected radio input and checked checkboxes using CSS. Styling Label of Checked Radio Button and Checkboxes We have created three ... Read More

Make DIV Elements Display Inline Using CSS

Devesh Chauhan
Updated on 21-Aug-2024 13:41:00

5K+ Views

To make div elements display inline using CSS, is a very simple and easy process. There are various approaches which we can use to make div elements display inline. In this article we will be understanding five different approaches and some other properties to make div element display inline. We are having three div boxes which are block element, our task is to make div elements display inline using CSS. Approaches to Make div Elements Display Inline Using CSS Here is a list of approaches to make div elements display inline using CSS which we will be discussing in this ... Read More

Difference Between GAGAN and GPS

Shirjeel Yunus
Updated on 21-Aug-2024 11:32:48

284 Views

GPS is a navigation system that is based on satellite and users can use it to reach their destination as they will be able to know the location and route of the place where they have to go. GAGAN is developed by ISRO which helps to make the GPS signals accurate. In this article, we will discuss the difference between GAGAN and GPS. What is GPS? The full form of GPS is Global Positioning System. This is a system in which a network of satellites is used in space to know the location of a certain place all over the ... Read More

Difference Between LXD and Docker

Shirjeel Yunus
Updated on 21-Aug-2024 11:23:31

271 Views

There are many container management tools that are used to create, deploy, and scale containers. LXD and Docker are two of the tools which work efficiently so that the containers can be easily maintained and applications can be easily developed. In this article, we will discuss the difference between LXD and Docker. What is LXD? The full form of LXD is Linux Container Hypervisor. This is an open-source container management system which is used for Linux Containers. The developer of LXD is Canonical Ltd. LXD is also known as image-based platform as a large number of images are provided for ... Read More

Check If a File or Directory Is Readable in Java

karthikeya Boyini
Updated on 21-Aug-2024 00:09:20

2K+ Views

In this article, we will learn to check if a file or directory is readable. We will use the Java File canRead() method of the java.io package to check if a file or directory is readable in Java. This method returns true if the file specified by the abstract path name can be read by an application and false otherwise. Steps to check if a file or directory is readable Following are the steps to check if a file or directory is readable − First we will import the File class from the java.io package ... Read More

Combine Two Lists by Alternately Taking Elements in Java

Bharti Kumari
Updated on 21-Aug-2024 00:06:57

2K+ Views

Introduction The Java program to combine two lists by alternatively taking elements is a simple code snippet that takes in two lists of any type of object that can be stored in a list and returns a new list that contains elements from both input lists alternately. The program defines a method called alternateMerge that takes two lists as input and returns a new list that contains elements from both lists alternately. It determines the size of both lists and loops through the larger of the two lists. For each index in the loop, it adds the element from the ... Read More

Get Lowest and Highest Value in TreeSet in Java

Krantik Chavan
Updated on 21-Aug-2024 00:03:22

2K+ Views

In this article, we will learn how to find the lowest and highest values in a TreeSet in Java. The TreeSet class, part of the java.util package, automatically sorts its elements in natural order. We will use the first() and last() methods of the TreeSet class to retrieve the smallest and largest elements, respectively Problem Statement Write a Java program to get the lowest and highest value in TreeSet. Input 50, 100, 150, 200, 250, 300, 400, 500, 800, 1000 Output TreeSet Lowest value = 50TreeSet Highest value = 1000 Steps to get the lowest and highest value in TreeSet ... Read More

Split String in Java Using Regular Expression

V Jyothi
Updated on 21-Aug-2024 00:03:07

6K+ Views

In this article, we will learn to split a string in Java using regular expressions. We will be using the split(String regex) method of the String class to split this string around matches of the given regular expression. This method works in the same way as invoking the method i.e. split(String regex, int limit) with the given expression and a limit argument of zero. Therefore, trailing empty strings are not included in the resulting array. Steps to split string in Java using regular expression Following are the steps to split strings in Java using regular expression − ... Read More

Set Alternate Table Row Color Using CSS

Shabaz Alam
Updated on 20-Aug-2024 14:51:49

11K+ Views

To set alternate table row color using CSS, is also known as zebra striping. It is helpful in improving the readability of table as it is easier to distinguish between rows. In this article, we will be understanding four different approaches to set alternate table row color using CSS. We are having a 5*2 table, our task is to set alternate table row color using CSS. Approaches to Set Alternate Table Row Color Here is a list of approaches to set alternate table row color using CSS which we will be discussing in this article with stepwise explaination and complete ... Read More

Advertisements