Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Lang Attribute
Lang Attribute

Lang attribute is used to declare language for screen readers and search engines. The lang means language which can be any language Lang attribute is always is used in <html> tag.

Syntax

<html lang=en>Content</html>


Here en is two letter language name which means english language.


Example

lang attribute in html tag


Practice Task

Open notepad or any other text editor, follow the following points.


  • write some html code
  • Use lang attribute along with it's two letter country name
  • Use <br /> if neccessary otherwise leave it

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

Lang attribute along with two letter country name is in html tag


In above task en means english language and US means the United States