Articles → HTML → Lang Attribute In HTML

Lang Attribute In HTML






Why Do We Need Lang Attribute?







Syntax


<element lang="language_code">



What Is Language Code?




  1. en stands for English
  2. hi stands for Hindi

Example


<html lang="en">
   <head>
      <title>lang demo</title>
   </head>
   <body></body>
</html>



Using Dialect In Lang








<html lang="en-us">
   <head>
      <title>lang demo</title>
   </head>
   <body></body>
</html>



Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Friday, September 23, 2016
 
Updated On  -  Saturday, September 16, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250