CSS only-of-type Selector :only-of-type
What is CSS lang Selector?
CSS :lang selector select all matches element whose have lang attribute value "fr" (without single/double quote).
Syntax
General syntax of :lang selector,
/* All checked elements */
:lang(language-code) {
property: value;
property: value;
...
}
element:lang(language-code) {
property: value;
property: value;
...
}
Example
CSS :lang selector select all matches <p> element whose have attribute value "fr".
<!DOCTYPE html>
<html>
<head>
<title>CSS :lang() Selector</title>
<style type="text/css">
a:lang(fr) {
background: yellow;
}
</style>
</head>
<body>
<a lang="en" href="#">English International</a><br />
<a lang="fr" href="#">French</a><br />
<a lang="us" href="#">Google</a><br />
</body>
</html>
Browser Compatibility
- Google Chrome 2+
- Mozilla Firefox 1.7+
- Internet Explorer 8+
- Opera 8.0+
- Safari 3.1+
Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.