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

HTML

JJ T
JJ T
6,276 Points

Problems 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 :)

https://w.trhou.se/r7p0u43hcw

6 Answers

Christof Baumgartner
Christof Baumgartner
20,864 Points

you have two html-opening tags at the beginning. You should delete the one in line 3:

<html lang="en"> <html>

JJ T
JJ T
6,276 Points

Tried it, doesn't work

Christof Baumgartner
Christof Baumgartner
20,864 Points

Could 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
Christof Baumgartner
20,864 Points

To summarize:

  1. open your workspace
  2. click on the eye in the top-right of your workspace, that says 'Preview workspace'
  3. on the page that opens then, you will see an index of all the files that you have in your workspace
  4. a classical webpage is an html-file, so click on your WhatToEat.html to open it
  5. 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
JJ T
6,276 Points

I get this whenever I try to run it:

Index of /

Untitled/ WhatToEat.html styles.css

Christof Baumgartner
Christof Baumgartner
20,864 Points

This 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
JJ T
6,276 Points

Sorry I don't get it. What do you mean with I run the parent directory? What does that even mean?

Christof Baumgartner
Christof Baumgartner
20,864 Points

The 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
JJ T
6,276 Points

Thx !

Christof Baumgartner
Christof Baumgartner
20,864 Points

Upvoting and accepting answers always welcome ;-)