Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Passcode:
Language declaration html5 in HTML5 Basics of HTML5 & CSS3 Examples
1351 Views
Lang Declaration 
lang attribute used to specify the language of content.It declared purpose is to identify by the browser to translate into specific languages(i.e if you run some web application in browser ask you to translate to particular languages). Can use lang attribute in <html> tag and also in specific tags.If you declared lang attribute in html tag it means that the complete document of the page defines to that particular language.

lang attribute vales are "en" for english , "fr" for french, "it" for italian, "nl" for Dutch etc., For different language you can search it in internet.
Lang attribute declared in <html>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <title>Language Declaration</title>
    </head>
    <body>
        <p>This example explains about language declartion in HTML5</p>
    </body>
</html>
Lang declared in specific tag
<!DOCTYPE html>
<html>
       <head> 
          <meta charset="UTF-8"/>
          <title>Language Declaration</title>
       </head>
       <body>
           <p lang="en">This example explains about language declartion in HTML5</p>
       </body>
</html>
Lang declared in html tag and specific tag
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <title>Language Declaration</title>
    </head>
    <body>
        <p lang="fr">Cet exemple explique sur declartion de langue en HTML5</p>
    </body>
</html>
Previous Topics
Previous lessons of current book.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details