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 trialname564681351614
3,497 PointsWebpage with image is not correct. Code identical to Nick's.
My code looks identical to Nick's. My webpage is pasted below. My code it pasted below that. Please help, I have no idea why this is not correct.
Website (copy and pasted - if you would like an actual screenshot let me know):
<!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>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<section>
<ul>
<li>
<img src="img/numbers-01.jpg" alt="">
</li>
</ul>
</section>
<footer>
<p>© 2014 Nick Pettit.</p>
</footer>
</body>
</html>
name564681351614
3,497 PointsHi Brent, I thought my code didn't quite paste right. Hopefully below works. Regarding the space in my file name. I didn't quite catch that. Where did you see that? I can't seem to locate it.
Thank you very much for the help. I really appreciate it.
My code never seems to copy and paste into this forum accurately. Below is a link to Google docs I where I posted it.
Thanks!
https://docs.google.com/document/d/1hDuoS0_AfIcvv6fdwRdN-ZVBFOVHMV_nXuwQ3si9pD0/edit?usp=sharing
Brent Cralley
18,541 PointsHere's how you post the code:
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>
```
8 Answers
name564681351614
3,497 PointsBrent - Let me know if this works!
'''html <!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> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <ul> <li> <img src="img/numbers-01.jpg" alt=""> </li> </ul> </section> <footer> <p>© 2014 Nick Pettit.</p> </footer> </body> </html> '''
name564681351614
3,497 PointsBrent - Sorry, clearly that didn't come through how I thought it might/should. Let me know if the Google doc link works.
Brent Cralley
18,541 PointsThe key right above the tab key on your keyboard, not a single quotation mark...
name564681351614
3,497 Points<!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>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<section>
<ul>
<li>
<img src="img/numbers-01.jpg" alt="">
</li>
</ul>
</section>
<footer>
<p>© 2014 Nick Pettit.</p>
</footer>
</body>
</html>
Brent Cralley
18,541 PointsIs your picture located in the same file as your html file? If not, add a "../" before your file name for the image.
The two periods .. tells the browser to not look for the file in the same folder as the html file, but to go out of that folder, into other folders on your computer.
I normally just put the file into the same folder, and that way you don't have to deal with this issue.
Hope that helps!
-Brent C.
name564681351614
3,497 PointsJust tried that. Didn't seem to do much. I did everything within the tutorial exactly how instructed.
Here's a screenshot of my workspace. I did have an issue with getting the images into the workspace initially but I think I ended up doing it right.
https://docs.google.com/document/d/1u_MIR6biasqkF6OowLYyqrBpSumIW_J5Ki1kmQy33M8/edit?usp=sharing
PS - I saw you live near Minneapolis. I'm in Omaha. I have family up in MN and we lived in Minneapolis for 4 months back in 2012 as my son was having a bone marrow transplant at the Amplatz childrens hospital there. Great city!
Hugo Paz
15,622 PointsDo you have your image on the same folder where you have the index.html file? If you do, just type
<img src="numbers-01.jpg" alt="">
Brent Cralley
18,541 PointsI've lived here most of my life. Cold city!
As for your code, I copied and pasted it in my text editor. I replaced the image src value with one of my own images in the same folder, and it worked.
The only thing I can come up with here is that, somehow, you've got the file name/location wrong. Then again, I'm a noob myself, and still learning these things.
-Brent C.
name564681351614
3,497 PointsHey Hugo. Thanks! I actually did not have an "index.html" file over on the left side of the workspace. I added that, copied my code over and everything worked. Thanks!
Brent Cralley
18,541 PointsBrent Cralley
18,541 PointsEric,
Could you please try posting your code again? Remember to use three of these little things "`" before and after the code.
Also, it looks like there might be a space in your file name. Remember not to have spaces in your references.
Hope I can help...
-Brent C.