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 Introduction to HTML and CSS (2016) Make It Beautiful With CSS Select and Style by Class

Aman Berhanu
Aman Berhanu
3,745 Points

How do you link the HTML to CSS file

I've seen in other tutorials that the CSS styles are defined at the top of the in the Head tag. How do you link your HTML to CSS file?

2 Answers

Mayur Pande
PLUS
Mayur Pande
Courses Plus Student 11,711 Points

I think this is what you want;

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

where the href is a path to your stylesheet

Naraendra Reddy
seal-mask
.a{fill-rule:evenodd;}techdegree
Naraendra Reddy
Front End Web Development Techdegree Student 1,538 Points

Well, you can use the above element, <link rel="stylesheet" href="css/normalize.css" type="text/css" /> if you created a separate css document and remember, you can only specify it in the <head> section of your html code. Or, you can directly use <style> tag in the same html document code