Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Google Web Fonts

i am think i am using similar code i used b4 but seems like the fonts aren't loading

<html>
    <head>
        <script src="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:extralight,light,regular,bold"></script>
        <style>
        h1, h2, h3 { font-family: "Yanone Kaffeesatz"; color: red } 
        </style>
    </head>
    <body>
        <h1>This is some text</h1>
    </body>
</html>
like image 346
Jiew Meng Avatar asked May 18 '26 07:05

Jiew Meng


2 Answers

You need to include the font using a <link> tag.

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:extralight,light,regular,bold">

like image 135
Peter Kruithof Avatar answered May 20 '26 19:05

Peter Kruithof


According to Google Webfont page the correct notation is:

<link href=' http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:extralight,light,regular,bold' rel='stylesheet' type='text/css'>
like image 34
qbi Avatar answered May 20 '26 20:05

qbi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!