Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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">