Skip to content
Related Articles

Related Articles

Improve Article

HTML | Navigator language Property

  • Last Updated : 24 Nov, 2020

The Navigator language property is used for returning the browser’s language version. It is a read-only property and it returns a string representing the language version of the browser. 

Some of the possible language codes are :  

  • en-US
  • fr
  • en
  • de



Below program illustrates the Navigator language Property :

Checking the browser’s language version.  


<!DOCTYPE html>
      Navigator language Property in HTML
        h1 {
            color: green;
        h2 {
            font-family: Impact;
        body {
            text-align: center;
    <h2>Navigator language Property</h2>
<p>For checking the browser's language,
       double click the "Check Language" button:
    <button ondblclick="checklang()">
      Check Language
    <p id="lang"></p>
        function checklang() {
            var l =
                "Browser's Language : " + navigator.language;
            document.getElementById("lang").innerHTML = l;


After clicking the button 

Supported Browsers: The browser supported by HTML|Navigator language property are listed below: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :