The :hover selector CSS pseudo-class is used to style elements when the mouse hovers over them. It can be used on every element. We can… Read More
Tag Archives: CSS-Selectors
The [attribute^=value] selector is used to select those elements whose attribute value begins with given attribute. Syntax: [attribute^=value] { // CSS Property } Example: <!DOCTYPE… Read More
The [attribute|=value] selector is used to select those elements whose attribute value is equal to “value” or attribute value started with “value” with immediate followed… Read More
The [attribute~=”value”] selector is used to select those elements whose attribute value contains a specified word. The “value” must be present in the attribute as… Read More
The element1~element2 selector in CSS is used to match the occurrences of element2 followed by element1. It is not important to element1 immediately followed by… Read More
The [attribute=value] selector in CSS is used to select those element whose attribute value is equal to “value”.Syntax: element [attribute = "value"] { // CSS… Read More
The [attribute*=”str”] selector is used to select those elements whose attribute value contains the specified sub string str. This sub string could be at the… Read More
The :nth-last-of-type() Selector in CSS is used to style only those elements which are the nth number of child of the parent element. The selector… Read More
The [attribute$=”value”] selector is used to select those elements whose attribute value ends with a specified value “value”. The value need not to be present… Read More
The :nth-of-type() in css Selector is used to style only those elements which are the nth number of child of its parent element. An n… Read More
The nth-last-child() selector in CSS is used to match elements based on their position among the group of siblings, counting from end. Syntax: :nth-last-child(number) {… Read More
The :nth-child() CSS pseudo-class selector is used to match the elements based on their position in a group of siblings. It matches every element that is… Read More
The ::first-line selector in CSS is used to apply style to the first line of a block-level element. The length of the first line depends… Read More
The :not(selector) selector is used to style every element that is not the specified by selector. Since it prevents specific items from being selected, it… Read More
The ::first-letter selector CSS Pseudo-element is used to apply the style to the first letter of the first line of a block-level element, the condition… Read More