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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Daniel Nease](https://secure.gravatar.com/avatar/a12a00eea5a0748c5af236e380a6bba2?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Daniel Nease
2,838 PointsTrouble linking CSS file to HTML
<!DOCTYPE html>
<html>
<head>
<title>Daniel Nease Resume</title>
<link ref="stylesheet" href="res.css">
</head>
<body>
<img src="https://picsum.photos/200" alt="Daniel Nease, Web Developer">
<h1>Daniel Nease, Web Developer</h1>
<h2>Summary of Qualifications</h2>
<ul>
<li>Experience as a WB</li>
<li>Experience with HTML</li>
<li>No BS degree</li>
</ul>
</body>
</html>
h1{
color: blue;
}
![Jackson Monk](https://secure.gravatar.com/avatar/00bfd3a7cdc89ba48f94b3530db314d2?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jackson Monk
4,527 PointsTo format your code better, try wrapping your code with three backticks. at the end of the first set of backticks, type 'html', like this:
//Write code here
![Justin Moore](https://secure.gravatar.com/avatar/73317c9ea23231b513988703ed4c7894?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Justin Moore
6,644 PointsThe problem is you have your stylesheet as a ref when it should be a rel, your code should look like this
<link rel="stylesheet"..../>
1 Answer
![Matthew Lang](https://uploads.teamtreehouse.com/production/profile-photos/8376062/micro_LogoJPEG500.jpg)
Matthew Lang
13,483 PointsThe link
tag takes many attributes, however the most important are these 3:
- rel
- href
- type
The rel attribute should specify the relationship between the current document and the linked document. In this case, it's a 'stylesheet', which you have in your code, however you have specified it as a 'ref'. Maybe you mistyped.
It should be:
<link rel="stylesheet" href="res.css" type='text/css'>
Daniel Nease
2,838 PointsDaniel Nease
2,838 Pointsall the files are in the same folder fyi and all are labeled correctly.