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 trialJJ T
6,276 PointsProblems with basic HTML website
I've tried to make a simple/basic HTML website to practice what I've learned so far. But I'm having problems with running it Can Someone please take a look :)
6 Answers
Christof Baumgartner
20,864 Pointsyou have two html-opening tags at the beginning. You should delete the one in line 3:
<html lang="en"> <html>
Christof Baumgartner
20,864 PointsCould you further specify what is not working? In case you have Problems with the pictures, it could be because the folder has a capital I and your path a lower i So you should write this:
<img src="Img/download1.jpg" alt="closed curtain">
<img src="Img/download2.jpg" alt="closed curtain">
<img src="Img/download3.jpg" alt="closed curtain">
Christof Baumgartner
20,864 PointsTo summarize:
- open your workspace
- click on the eye in the top-right of your workspace, that says 'Preview workspace'
- on the page that opens then, you will see an index of all the files that you have in your workspace
- a classical webpage is an html-file, so click on your WhatToEat.html to open it
- You should see your web-page now
Additional
0.1) There was an error with your picture path: because the folder has a capital I and your path a lower i So you should write this:
<img src="Img/download1.jpg" alt="closed curtain">
<img src="Img/download2.jpg" alt="closed curtain">
<img src="Img/download3.jpg" alt="closed curtain">
0.2) you have multiple html-opening tags at the beginning. You should delete the one in line 3:
<html>
JJ T
6,276 PointsI get this whenever I try to run it:
Index of /
Untitled/ WhatToEat.html styles.css
Christof Baumgartner
20,864 PointsThis happens because you run the parent directory. You need to run the WhatToEat.html page. Normally you should be able to click on the link in the index to get to the file.
JJ T
6,276 PointsSorry I don't get it. What do you mean with I run the parent directory? What does that even mean?
Christof Baumgartner
20,864 PointsThe folders on a web page like this, work the same like folders on your PC. When you run it, it is showing you the files in your workspace. To get to your webpage, you just click on the .html file, you want to open. The URL will then look something like this: http://port-80-123456.treehouse-app.com/WhatToEat.html . This means that you open the file WhatToEat.html
JJ T
6,276 PointsThx !
Christof Baumgartner
20,864 PointsUpvoting and accepting answers always welcome ;-)
JJ T
6,276 PointsJJ T
6,276 PointsTried it, doesn't work