Usage of :lang pseudo-class in CSS

CSSWeb DevelopmentFront End Technology

Use the :lang pseudo class to specify a language to use in a specified element. This class is useful in documents that must appeal to multiple languages that have different conventions for certain language constructs.


You can try to run the following code to understand the usage of :lang pseudo class

         /* Two levels of quotes for two languages*/
         :lang(en) { quotes: '"' '"' "'" "'"; }
         :lang(fr) { quotes: "<<" ">>" "<" ">"; }
      <p>...<q lang="fr">A quote in a paragraph</q>...</p>
Updated on 04-Mar-2020 12:46:57