Published on: 30 Sep, 2019

How to target language attribute selector in CSS?

Tumblr Digg Google Plus

If you want to target a language attribute selector in CSS, you can use the attribute lang.

For example, let says we want to target a div contains a language attribute of en-US. We want to change the font style of text to use italic style.

<div lang="en-US">
This div element tag contains English language.

Based on above example, we can use the following css code.



There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.