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) Adding a New Web Page Write the CSS

Hey my resume.css is not loading. Everything seams to be right. PLS HELP!!!

The .css is right the link to stylesheet is also right. I tested it in Atom its working but on this web page not.

Flor Antara
Flor Antara
12,372 Points

Hi Aretm,

Can you share the code or a link to it?

Hey Flor This is working

<!DOCTYPE html> <html> <head>

<!-- Metadata goes here -->
<style rel = "stylesheet" herf = "resume.css"/>
h1{
    color:blue;
    background-color:#efefef;
    padding: 10px;
  }
  body{
    color: black;
    text-align:center;
    font-family:"Arial"
  }
  .img-main{ border: solid 4px black; 
    border-radius: 50%; 
  }
  .second-h{
    text-transform: uppercase;
  } 

</style>  

</head> <body> <img src = "https://placeimg.com/200/200/tech" alt="TECH" class = "img-main">

<h1>Hey it's me Artem</h1>
<h2 class = "second-h">Meine Qualifikationen</h2>
<ol>
<li>Erfarung mit:</li>
<li>JAVA</li>
<li>C/C++</li>
<li>PYTHON</li>  
<h2 class = "second-h">Lebenslauf</h2>  
</ol>

</body> </html>

but tis not:(

resume.html

<!DOCTYPE html> <html> <head>

<!-- Metadata goes here -->
<style rel = "stylesheet" herf = "resume.css"/>
</style>  

</head> <body> <img src = "https://placeimg.com/200/200/tech" alt="TECH" class = "img-main">

<h1>Hey it's me Artem</h1>
<h2 class = "second-h">Meine Qualifikationen</h2>
<ol>
<li>Erfarung mit:</li>
<li>JAVA</li>
<li>C/C++</li>
<li>PYTHON</li>  
<h2 class = "second-h">My Jobs</h2>  
</ol>

</body> </html>

resume.css

h1{ color:blue; } body{ color: black; font-family:"Arial" } .img-main{ border: solid 4px black; border-radius: 50%; }

5 Answers

sry I spelled "href" wrong that was the problem

Flor Antara
Flor Antara
12,372 Points

Hi Aretm,

So you just have a couple of typos there:

This:

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

Should read:

<link rel="stylesheet" href="resume.css" type="text/css">
  • Remember to don't leave spaces around = on attributes.
  • Also, when you have a similar issue in the future, it's a good practice to run your code through the W3C HTML Validator. https://validator.w3.org It'll help you debug it.
Flor Antara
Flor Antara
12,372 Points

Hi Aretm,

Thanks for sharing that.

I see what the issue is.

  • You have a linked stylesheet, but you are using the <style> tag to include the file in your HTML.

To link an external stylesheet, you'll want to use the link tag, like:

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

So in your <style> tag, just remove the part that goes:

rel = "stylesheet" herf = "resume.css"/.

And you should end up having:

<link rel="stylesheet" href="resume.css" />
<style>
.... your styles here...
</style>

Hey Flor

Thanks for your answer but unfortunately I copied the wrong code. hire is the right one resume.html

<!DOCTYPE html> <html> <head>

<!-- Metadata goes here -->
<link rel = "stylesheet" herf = "esume.css" type="text/css">

</head> <body> <img src = "https://placeimg.com/200/200/tech" alt="TECH" class = "img-main">

<h1>Hey it's me Artem</h1>
<h2>Mein Qualifikationen</h2>
<ol>
<li>Erfarung mit:</li>
<li>JAVA</li>
<li>C/C++</li>
<li>PYTHON</li>
</ol>

</body> </html>

Thank you for your reply in advance

Thank you very much for your Help