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
samueljhan
1,732 PointsAnswers to code challenges from How to make a website
How do you do the following code challenges from How to make a website by Nick Pettit:
- Creating HTML Content
- Adding Pages to a Website
- Responsive Web Design and Testing
samueljhan
1,732 PointsTo Kez Khou: First of all, they are not the quizes. I need the answers to the code challenges. I have emailed the instructor but there is no response from him. Secondly, I AM ALREADY VERY SPECIFIC IN MY QUESTION.
4 Answers
Dustin Matlock
33,856 PointsSamuel, I'm going to walk you through Creating HTML Content.
Challenge Task 1 of 3
Create a navigation element with an unordered list element after the link inside the header. Don’t add any list items or links just yet.
The challenge wants you to create a navigation element <nav> with an unordered list <ul> after the link inside the <header>.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit | Designer</title>
</head>
<body>
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a> <!-- This is the link that we'll place our navigation after -->
<nav>
<ul>
</ul>
</nav>
</header>
<section>
<p>Gallery will go here.</p>
</section>
<footer>
<p>© 2014 Nick Pettit.</p>
</footer>
</body>
</html>
Challenge Task 2 of 3
Inside the navigation element, create three list items with the words, “Portfolio”, “About”, and “Contact”. Don’t add links yet.
We're going to create three list items <li> within the navigation element <nav>. Capitalization does matter in this challenge, but only for the sake of context.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit | Designer</title>
</head>
<body>
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
<nav>
<ul>
<li>Portfolio</li>
<li>About</li> <!-- Our list items and their names with the first letter capitalized -->
<li>Contact</li>
</ul>
</nav>
</header>
<section>
<p>Gallery will go here.</p>
</section>
<footer>
<p>© 2014 Nick Pettit.</p>
</footer>
</body>
</html>
Challenge Task 3 of 3
Link each of the three list items. Portfolio should go to “index.html”, About should go to “about.html”, and Contact should go to “contact.html”.
We will now add our links to the pages inside of each list item.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit | Designer</title>
</head>
<body>
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="about.html">About</a></li> <!-- As you can see, we now have links to our pages -->
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<section>
<p>Gallery will go here.</p>
</section>
<footer>
<p>© 2014 Nick Pettit.</p>
</footer>
</body>
</html>
Let me know if you follow me with this first challenge, or if you have any questions, and if you understand thus far, we can move to the next challenge.
samueljhan
1,732 PointsDustin Matlock,
I forgot to be specific in my question.
In Creating HTML Content: 2nd code challenge (trouble). In Adding Pages to a Website: 1st and 2nd code challenge (trouble). In Responsive Web Design and Testing: 2nd code challenge (trouble).
I just don't understand it. Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Samuel
Dustin Matlock
33,856 PointsHi Samuel, you'll have to be more specific with your question. We are not allowed to provide answers without explanations on the forum, but if you'd like to share some of your code, we can most likely give you some pointers.
samueljhan
1,732 PointsI cannot get the questions in the code challenges even though I have watched the videos again.
Kez Khou
3,903 Pointsmy apologies samueljhan , I guess I did not understand your question. As Dustin Matlock has instructed you, please post the code using the following instructions : Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.
```html
<p>This is code!</p>
```
Once your code has been posted along with your question regarding your code MODS and everyone else will be able to better assist you. Thank you.
Kez Khou
3,903 PointsKez Khou
3,903 PointsPlease be more specific, If I remember correctly those code challenges are multiple choice, do you have questions regarding specific questions in each of the three challenges you listed?