:lang()

Posted by & filed under L.

The :lang() pseudo class selector in CSS matches elements based on the context of their given language attribute. Language in HTML, is determined by a combination of the lang=”” attribute, theelement, and by information from the protocol such as the HTTP Accept-Language request-header1 field. Acceptable language-code strings are specified in the HTML 4.0 specification. :lang(language-code)

Continue reading →

ID

Posted by & filed under I.

The #id selector allows you to target an element by referencing the id HTML attribute. Similar to how class attributes are denoted in CSS with a “period” (.) before the class name, ID attributes are prefixed with an “octothorpe” (#), more commonly known as a “hash” or “pound sign”. <header id=”site-header”></header> #header { /* this

Continue reading →

:invalid

Posted by & filed under I.

The :invalid selector allows you to select <input> elements that do not contain valid content, as determined by its type attribute. :invalid 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 →

:in-range

Posted by & filed under I.

The :in-range pseudo selector in CSS matches input elements when their value is within the range specified as being acceptable. <input type=”number” min=”5″ max=”10″> input:in-range { border: 5px solid green; } I believe it’s only relevant on input[type=number]. Range inputs don’t allow values outside their min/max and it doesn’t make much sense on any other

Continue reading →