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

How do I make a webpage outside of workspace

I tried creating pretty much the same code in notepad that we have made in workspace (for our personal page) but I can not get it to work. Particularly I can't get images to show and don't know how to create/link a css page to the code. How is this done outside of workspace?

2 Answers

Hi Eric,

I would love to help out here. First, I would recommend that you use an IDE (Integrated Development Environment) instead of notepad. Notepad works... but it does not have code validation or markup recognition to help you visually scan for errors.

There are some really good and free IDE's out there. I recommend Brackets (http://brackets.io/). It is one of the best I have used.

Now onto the question at hand... follow the below steps.

  1. First create a folder, name it anything... doesn't matter. This will be the root folder of your website. Then you want to save your notepad file as 'index.html' file in here. Make sure that you add the extension otherwise your computer won't know it is a website.

  2. Second create two folders inside the root folder, name one 'img' and the other 'css'. This is pretty standard and should match how the course told you to do things. Now load your '.css' and and images in the corresponding folders.

Inside of your index page you need to link in the css files using the below code. Make sure that the file name matches exactly what you saved them as (case sensitive) in the folders.

<link rel='stylesheet' href="css/main.css">

When you are linking to images in your html, make sure that you are also pointing to the folder they exist in. See the below example.

<img src="img/image01.png">

Ahh ok that makes a little more sense. Thank you very much for your help!

You're welcome!

Thanks a lot sir :D you saved my time :D