lang Selector

lang Selector
CSS lang Selector reference
The CSS lang pseudo-class selector ( X:lang() { } ) is used to target and style elements where their HTML "lang" attribute value matches the selectors defined language code. In the example below only the spanish language HTML elements will be selected and styled independently because they have the HTML language attribute set for that particular language.
CSS CODE EXAMPLE
<!DOCTYPE html>
<style type="text/css">
*: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>
 
My paragraph content ...
Mi punto contenido ...
My paragraph content ...
Mi punto contenido ...

0 Response to "lang Selector"

Post a Comment