5. More Font- GoogleFont provided code


#1

I don't have problem with exercises,
but when I try to get the URL by myself from Google Font, I got the code like this:

<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">

but for what I learned, it should also include the type attribute, like this:

<link href="https://fonts.googleapis.com/css?family=Roboto" type="text/css" rel="stylesheet">

I try to run this two, and end up with the same result, so does this mean I can write my code without the type attribute?


#2

In older versions of HTML it was needed, with HTML5 if you are linking up a CSS file its not necessary as text/css is default.

Spec overview


#3

Oh I see
Thank you for response!
:slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.