Skip to content

Tag Archives: CSS-Selectors

The .class selector is used to select all elements which belong to a particular class attribute. To select the elements with a particular class, use… Read More
The element selector in CSS is used to select HTML elements which are required to be styled. In a selector declaration, there is the name… Read More
The element, element selector in CSS is used to style all comma separated elements with the same style. Syntax: element, element { // CSS Property… Read More
The element element selector in CSS is used to select elements inside the elements i.e it combines two selectors such that elements matched by the… Read More
The :optional selector in CSS is used to select and style the form input elements which are optional. That is it can select those input… Read More
The :lang Selector is used to target the element which is based on language attributes for a specific value. This selector work with the help… Read More
The :last-of-type Selector is used to target the last child element of the same type of it’s parent for styling. This selector is same as… Read More
The :last-child Selector is used to target the last child element of it’s parent for styling. This selector is same as “:nth-last-child”. Syntax: :last-child {… Read More
The :link is used to target the unvisited link for styling not the links which is already visited. For styling on visited use “:visited“, for… Read More
The :first-of-type Selector is used to targeting the first child of every element of it’s parent. if we want to style the first child of… Read More
The :enabled selector is used to set the background color in enabled element in a form. Syntax: :enabled { //property } Example: <!DOCTYPE html> <html>… Read More
The :default selector is used to set a default element in a group of same type of element in a form. This selector is used… Read More
The target selector is used to represent a unique element (the target element) with an id matching the URL’s fragment. It can be used to… Read More
The :focus Selector is used to target the focused element. This selector work on User Input elements. Syntax: :focus { //property } Example: <!DOCTYPE html>… Read More
The :read-write selector is used to select an element (such as an input text) that is editable by the user. The elements with no readonly… Read More