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
Philip Ollas
5,705 PointsHi have ran into a problem during coding, it didn't see that I got these two pages link. What went wrong?
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Embeded youtube video</title> <link href="index.css" rel="stylesheet" type="text/css" /> </head> <body class="youtube"> <h1 class="main-header"> Watch and be illuminated </h1> <img class="arrow" src="img/arrow.svg" alt="Down arrow"> <a href= "index.html" id="logo"> <h2 class="selected"><a href="#">Get a free 10 step copy»</a></h2> </a> <iframe width="500" height="500" src="//www.youtube.com/embed/fXm9EwzSjO4?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>
<div id="wrapper">
<header>
<nav>
<ul>
</ul>
</nav>
</header>
<footer>
<h3>Sign up for the training session and get a free manual on how to start a business from scratch</h3>
<form action ="#" method="#">
<div>
<input id="name" type="text" required>
<label for="Name">First name</label>
</div>
<div>
<input id="email" type="email" required>
<label for="email">Email</label>
</div>
<div>
<div><input type="submit"></div>
</form>
</footer> </body> </div>
</html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Ebook download</title> <link href="index.css" rel="stylesheet" type="text/css" /> </head> <body> <h4 class="selected">Get your free 5 step manual to wealth creating </h4> <p>You are about to enter the wealth zone your boss doesn't want you to go. Take this copy and run! </p> <img class="ebook" src="img/book-cover.jpg" alt="book-cover"> <div> <input id="email" type="email" required> <label for="email">Email</label> </div>
<div><input type="submit"></div>
</body> <footer>
</footer> </body> </div> </html>
4 Answers
Steven Parker
243,134 PointsI spot an id mismatch.
Your first input element has an id of "name" (all lower case), but the label is for "Name" (capital "N"). Is that your issue? It not, perhaps I don't understand the problem — could you elaborate a bit more? Also please provide a link to the course page you are working with.
Also, it's very hard to read unformatted code. The instructions for code formatting are in the Markdown Cheatsheet pop-up below the "Add an Answer" section.
Steven Parker
243,134 PointsTry removing the nested links ("a" tags).
Just have the one link that encloses the h2. Change downloadPage.html to the real name of the page you want to link to.
<a href="downloadPage.html" id="logo">
<h2 class="selected">Get a free 10 step copy»</h2>
</a>
Philip Ollas
5,705 PointsThank you Steven for the answer, I'm happy you helped me out. Happy coding!
Philip Ollas
5,705 Points<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Embeded youtube video</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>
<body class="youtube">
<h1 class="main-header"> Watch and be illuminated </h1>
<img class="arrow" src="img/arrow.svg" alt="Down arrow">
<a href= "index.html" id="logo">
<h2 class="selected"><a href="#">Get a free 10 step copy»</a></h2>
</a>
<iframe width="500" height="500" src="//www.youtube.com/embed/fXm9EwzSjO4?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>
<div id="wrapper">
<header>
<nav>
<ul>
</ul>
</nav>
</header>
<footer>
<h3>Sign up for the training session and get a free manual on how to start a business from scratch</h3>
<form action ="#" method="#">
<div>
<input id="name" type="text" required>
<label for="name">First name</label>
</div>
<div>
<input id="email" type="email" required>
<label for="email">Email</label>
</div>
<div>
<div><input type="submit"></div>
</form>
</footer>
</body>
</div>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Ebook download</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h4 class="selected">Get your free 5 step manual to wealth creating </h4>
<p>You are about to enter the wealth zone your boss doesn't want you to go. Take this copy and run! </p>
<img class="ebook" src="img/book-cover.jpg" alt="book-cover">
<div>
<input id="email" type="email" required>
<label for="email">Email</label>
</div>
<div><input type="submit"></div>
</body>
</html>
´´´
Steven Parker
243,134 PointsRemember to provide a link to the course page also.
Philip Ollas
5,705 PointsNow that my code is redone. I'll make my best to rephrase myself. Today I've been working on this specific code. One thing I can't get done is to link the h2 to the download page starting with the second <!DOCTYPE html>. So that when you click on the h2 link, you get straight to the download page. Please note that I've done this on two separate sheets but for illustration of the problem I put them on the same page. Thank you in advance.
Philip Ollas
5,705 PointsPhilip Ollas
5,705 PointsOkay no worries, I'll modify the code so that it's more readable and rephrase my question :D.