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

HTML How to Make a Website Creating HTML Content Include External CSS

Reagen Rahardjo
Reagen Rahardjo
3,770 Points

what is the function "rel" attribute inside the <link>

what is the the rel function inside the link?

<link rel="stylesheet" href="css/normalize.css">

is the "stylesheet" is the relative naming or it has connection to the normalize.css

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Reagen,

rel in this example stands for "relationship". It is not related to Normalize.css specifically. What it is doing is establishing a relationship between the linked document and the HTML document. So, in this case, the relationship is going to be a stylesheet. There are many relationships, but this would be the most commonly used. If you want, you can read up on some of the others on MDN.

Hope that helps. Keep Coding!

:dizzy:

Mandaar Dahale
Mandaar Dahale
2,527 Points

the syntax is <link rel="stylesheet" href="css/normalize.css"> Here to establish a link for another file, naturally we have to give the location of that file and the have to state the 'relationship' between our html page and that file. In current case it is style sheet file so we are stating rel="stylesheet".