CSS – Element > Element Selector
The element > element selector is used to select elements with a specific parent. The element > element selector can be used along with the #id, .class, and any other selector.
The element > element selector is used to select elements with a specific parent. The element > element selector can be used along with the #id, .class, and any other selector.
The Element + Next selector selects the very next element specified after (not within) the first specified element. The element + element selector can be used along with the #id, .class, and any other selector.
The element ~ element selector selects sibling elements that appear after the specified element. Both of the specified elements must share the same parent.
The :empty selector selects empty HTML elements, which means an element without any child elements or text.
The :first-child selector selects all HTML elements of a specified type that are also the first child of their parent element.
The ::first-letter selector is used to select the first letter of a specified, block-level element such as a paragraph or heading.
The ::first-line selector is used to select the first line of text of a specified, block-level element such as a paragraph or heading.
The :first-of-type selector selects all elements that are the first child of a specified type of their parent element.
The :fullscreen selector is used to select any elements that are in full-screen mode.
The :hover selector selects elements when you mouse over them, and is commonly used for links and images with links, but can be used on any element.
The #id selector selects an HTML element with a specific id. HTML only allows for one unique #id per document.
The :in-range selector selects elements with a value that is within a specified range, and only works for input elements with min/max attributes.
The :indeterminate selector selects form elements that are in an indeterminate state, and can only be used on input type=”checkbox”, input type=”radio”, and progress elements.
The :invalid selector selects form elements with a value that does not validate according to the element’s settings.
The :lang selector is used to select elements with a lang attribute with a specified value (e.g., lang = “en” or lang = “en-us”).
The :last-child selector selects all HTML elements of a specified type that are also the last child of their parent element.
The :last-of-type selector selects all elements that are the last child of a specified type of their parent element.
The :link selector is used to select unvisited links, and will not style links you have already visited.