Set the language of the linked document in HTML


Use the hreflang attribute to set the language of the linked document in HTML.

Example

You can try to run the following code to implement the hreflang attribute −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML hreflang attribute</title>
   </head>
   <body>
      <p>Database Tutorial:</p>
      <a href = "dbms/index.htm" hreflang = "en">DBMS</a>
   </body>
</html>

Updated on: 03-Mar-2020

75 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements