Selectors

Last updated on

:visited is a pseudo class selector used for anchor link elements that matches when the href attribute of that anchor link has been visited in the past by this browser. It is meant to be useful feedback for a user, so they can tell the difference between links they have been to and links they have

Continue reading →

Last updated on

The :valid selector allows you to select <input> elements that do not contain valid content, as determined by its type attribute. :valid is defined in the CSS Selectors Level 3 spec as a “validity pseudo-selector”, meaning it is used to style interactive elements based on an evaluation of user input. This selector has one particular use: providing a user with feedback while they are interacting

Continue reading →

Last updated on

The Universal Selector is the * in CSS. Literally the asterisk character. It is essentially a type selector that matches any type. Type meaning an HTML tag like <div>, <body>,<button>, or literally any of the others. A common use is in the universal reset, like this: * { margin: 0; padding: 0; } There are times when using the universal selector

Continue reading →

Last updated on

A Type Selector (sometimes referred to as an Element Type Selector) matches elements with the corresponding element node name, such as <p>, <span>, and <div> tags. Type selectors are generally used to make “broad stroke” changes to the style of a site. p { /* “p” is the type selector */ margin: 0 0 1em 0; } Common Usage

Continue reading →