This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

198 points
52046897548c3543aa000f42_512709833
Submitted by
Soraya
over 4 years ago

Can someone explain this lesson to me?

I think I understand the purpose of a link. If I'm correct, it's supposed to "link" the html document to the CSS stylesheet. What significance do type, rel and href have on CSS? Will we learn about this later?


5 votes

permalink

<link type="text/css" rel="stylesheet" href="stylesheet.css"/>

1- Ok, this is standard protocol. It will always be like this so you can memorize it or just copy it from another page each time you need to use it.

2- the only thing that may change is the name of the CSS file.

3- Yes, you are right. The browser links both files (CSS and HTML and makes just one file out of them).

4- type tells the browser that the CSS file is just text (no video or images) and it also tell it that the language is CSS ( not JavaScript).

5- rel stands for relation. it says that CSS is the style for HTML. Sometimes rel is used in other contexts but you probably will never see it.

2946 points
5533b41186f55278520000c6_295543857
Submitted by
tony de araujo
over 4 years ago

1 Comment

52046897548c3543aa000f42_512709833 Soraya over 4 years ago

Thank you Tony! This helps a lot