Skip to content
Related Articles

Related Articles

Improve Article

SVG lang Attribute

  • Last Updated : 05 Nov, 2020

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:

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 :