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" < 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" < text x = "5" y = "35" lang = "de-AT" font-size = "20px" >
Hallo, Willkommen bei geeksforgeeks
</ text >
</ svg >
</ body >
</ html >
|
Output: