Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

lang

The lang pseudo-class selector lang will target elements where their language attribute value matches the specified language code. In the example below all of the Spanish language HTML elements will be styled independently because they have the HTML language attribute set for that particular language.
Syntax Logicelement:lang( language_code ) { property_list }

CSS Code Example

<style> *:lang(es) { color:#090; font-style:italic; } </style> <p>My paragraph content ...</p> <p lang="es">Mi punto contenido ...</p> <p>My paragraph content ...</p> <p lang="es">Mi punto contenido ...</p>

CSS

Selectors

universaltypecompoundclassidnotattributedescendantchildadjacent siblinggeneral siblingfirst childlast childonly childfirst of typelast of typeonly of typenth childnth last childnth of typenth last of typeemptyrootfirst linefirst letterbeforeafterlinkvisitedhoveractivefocustargetenableddisabledcheckedlang