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
Hanna Mower
Front End Web Development Techdegree Student 2,872 PointsWhy won't my link work?!
I am trying to submit my first project for the web development track, and it keeps coming back with an error saying one of the links on my page doesn't work, despite passing the HTML and CSS verifyer. Can anyone help me here? Is there something I forgot to do?
Here's the code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hanna Mower | Profile</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css?family=Muli%7CRoboto:400,300,500,700,900" rel="stylesheet"></head>
<body>
<div class="main-nav">
<ul class="nav">
<li class="name">Hanna Mower</li>
<li><a href="index.html">Home</a></li>
</ul>
</div>
<header>
<img src="images/HannaProf.jpg" alt="Photo of Hanna in Tokyo" class="profile-image">
<h1 class="tag name">Hello, I’m Hanna.</h1>
<p class="tag location">I live in Salt Lake City, Utah.</p>
</header>
<main class="flex">
<div class="card">
<h2>Background</h2>
<p>With a background in non-profit work, and an interest in a wide variety of activities from travel to sudoku, I am an aspiring web designer because I believe it will allow me to show my strengths both analytically and creatively.</p>
<p>I have a Bachelor of Arts degree from the University of Utah.</p>
</div>
<div class="card">
<h2>Goals</h2>
<p>Eventually, I would like to have enough skills in the following areas to be able to work freelance:</p>
<ul class="skills">
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>Ruby</li>
</ul>
</div>
</main>
<footer>
<ul>
<li><a href="http://facebook.com/hanna.mower" class="social facebook">Facebook</a></li>
<li><a href="http://github.com/hannamower" class="social github">Github</a></li>
</ul>
<p class="copyright">Copyright 2016, Hanna Mower</p>
</footer>
</body>
</html>
Christopher McRoy
17,295 PointsHi Hanna, I seem to remember having a problem like that on one of my workspaces, and I found that I forgot to specify the correct folder location of the external CSS file. My CSS file was located in a css folder, so my href link looked like this:
<link rel="stylesheet" href="css/main.css">
There doesn't seem to be any other obvious errors, so I would start by double-checking your "styles.css" file location. Be sure to let us know when you find the fix! Good luck!
Simon Coates
28,695 PointsSimon Coates
28,695 PointsIt passed w3c verification. The only thing that looked maybe off was the ordering of the link elements. I don't use HTML at all, but I had some idea that you had to include the third party font prior to a style sheet that uses it (I could be wrong). Otherwise the exact text of the error message might be helpful - as is, it's a little ambiguous whether by 'link' you mean a <link> element or one of the anchor elements.