Open In App

SVG lang Attribute

Last Updated : 31 Mar, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The lang attribute is used to specify the language used in the element 

Syntax:

lang="language"

Attribute Values:

  • language: Language attribute is used to specify the language.

We will use the lang attribute for specifying the language. 

Example 1: In this example, we will use lang attribute to English.

HTML




<!DOCTYPE html>
<html>
  
<body>
    <svg viewBox="0 0 1000 250" 
        xmlns="http://www.w3.org/2000/svg">
          
        <text x="5" y="35" lang="en-US" 
            font-size="20px">
            GeeksforGeeks
        </text>
    </svg>
</body>
  
</html>


Output:

Example 2: In this example, we will use lang attribute to German Language.

HTML




<!DOCTYPE html>
<html>
  
<body>
    <svg viewBox="0 0 1000 250" 
        xmlns="http://www.w3.org/2000/svg">
          
        <text x="5" y="35" lang="de-AT" 
            font-size="20px">
            Hallo, Willkommen bei geeksforgeeks
        </text>
    </svg>
</body>
  
</html>


Output:



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads