Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Treehouse Club: CSS My First Web Page Color Keywords, Hex Colors, and Font Families

Google Fonts Code

In the original/default HTML head font link, Joy has rel="stylesheet" type="text/css" in her code. However when I look at the Google font codes, the ones I have selected do NOT have type="text/css" in the code, but it seemingly still works to change the font. Is this on a font-by-font basis, or should our code always have type=text/css" in the font source? Thank you!

1 Answer

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

Its not a necessary attribute to have in a link element. You however, do need at least two attributes when creating a link element which are href (which points to the path of the file) and the rel (which describes the relationship between the document and the external file). Below is an example of a general setup link element with these two attributes that you need.

<link rel="stylesheet" href="linktofile.css">