0
votes

I want to use Lato light google font on my website.

Added link herf=... and font family tag per instruction, but it's not working properly.

On my laptop where I have Lato fonts installed, I see Lato light font implemented; however, on my friend's computer as well as on my phone, I'm not seeing Lato light font (I see some random font instead)

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />



body {
font-family: 'Lato', sans-serif;
background-color: white;
font-weight: 300;
color: #595959; 
letter-spacing: 1.4px;

}

I don't know what the problem is -- when I delete font-family: 'Lato', sans-serif; below body {, I no longer see Lato font on my computer.... so it's working, but quite properly.

Input would be greatly appreciated!!!

2
use important like this "font-family: 'Lato', sans-serif !important;" - Omar Faruque
I would start by adding a doctype declaration, since without it the page is technically invalid, which makes your render mode somewhat unpredictable. - Tieson T.
its working fine here. Check this fiddle jsfiddle.net/j1ajzo4p . I have changed few elements for better understanding. - Karuppiah RK
it has <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> at the beginning. Is this what you meant? @TiesonT. - user2277916
@OmarFaruque that didn't work :/ - user2277916

2 Answers

1
votes

Try to this way, I think this is working very well

<link href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900" rel="stylesheet">
0
votes

It's working fine with right html declarations. And you can use updated lato font link

body {
	font-family: 'Lato', sans-serif;
    background-color: white;
    font-weight: 300;
    color: #595959; 
    letter-spacing: 1.4px;
}
<!Doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">

  <head>
	<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
  </head>

  <body>
	
    <p>I am paragraph</p>
  </body>

</html>