:link

Posted by & filed under L.

The :link selector is a pseudo-class that targets all unvisited anchor () elements on a page. a:link { color: aquamarine; } The example above will change the color of all unvisited links to aquamarine. When used in combination with the :hover pseudo-class, :link must appear first, or else not be defined at all, in order for the :hover styles to work.

Continue reading →

:last-of-type

Posted by & filed under L.

The :last-of-type selector allows you to target the last occurence of an element within its container. It is defined in the CSS Selectors Level 3 spec as a “structural pseudo-class”, meaning it is used to style content based on its relationship with parent and sibling content. Suppose we have an article with a title, several paragraphs and an image:

Continue reading →

:last-child

Posted by & filed under L.

The :last-child selector allows you to target the last element directly inside its containing element. It is defined in the CSS Selectors Level 3 spec as a “structural pseudo-class”, meaning it is used to style content based on its relationship with parent and sibling content. Suppose we have an article and want to make the last paragraph smaller, to

Continue reading →

: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 →