:lang() सेलेक्टर का व्यावहारिक उदाहरण
यह आलेख दिखाता है कि कैसे lang एट्रिब्यूट वाले पैराग्राफ को विशिष्ट स्टाइल दिया जा सकता है।
उदाहरण
<!DOCTYPE html>
<html>
<head>
<style>
p:lang(fr) {
background: green;
}
</style>
</head>
<body>
<p>This is my country</p>
<p lang="fr">C'est mon pays</p>
<p>French is the language of France</p>
</body>
</html>
केवल lang="fr" वाला पैराग्राफ हरे बैकग्राउंड के साथ स्टाइल होगा।