Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to write a para in Hindi language. And for that, I have copied and pasted a link of mukta-fonts in html page from google fonts site. Also, I have copied and pasted the font family in css. Still, the page is not showing Hindi fonts. Could you please help me?

What I have tried:

HTML
<html>

<head>
 <meta charset="utf-8">
  <link href="https://fonts.googleapis.com/css?family=Mukta&display=swap" 
  rel="stylesheet">
</head>

<body>
  <p>
    rqe dSls gksA
    esjk uke r:.k gSA
    D;k dj jgs gks
</p>
</body>

<style>
  p {
    font-size: 2rem;
    font-family: 'Mukta', sans-serif;
  }
</style>

</html>
Posted
Updated 4-Apr-20 3:07am
v4

1 solution

The proper way to set the language for an HTML document or element is to use the lang attribute.

If you wanted to apply this to the entire document, this should suffice
<html lang="hi">

And if you only wanted to do it to a particular paragraph, you could do this
<p lang="hi">yada yada yada</p>

References:
Declaring language in HTML[^]

Also....
The style element belongs within the <head> block, and I believe how you have it may be invalid.
 
Share this answer
 
Comments
Tarun Rathore 4-Apr-20 10:00am    
I have made the corrections suggested by you, but the problem still exists.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900