Skip to content

This is one of our old lessons! Visit the Path page to see all of our latest courses.

Project structure – HTML

Details

If you only have a handful of HTML files, you can keep them all in your root folder, like this:

  • project-folder/
    • index.html
    • about.html
    • contact.html

Clean URLs

If you want clean URLs without the .html file extension at the end, you can create folders for your other pages with the names you want for your URLs and add an index.html file to each folder, like this:

  • project-folder/
    • index.html
    • about/
      • index.html
    • contact/
      • index.html

In this example, the other pages would be accessed by adding /about/ or /contact/ to the end of your domain name when you publish your site.

Add an image folder

If your project includes images, you might want to include a separate folder for your images as well to keep your project organized. You can name it whatever you want, but it might be helpful to name it img or images, like this:

  • project-folder/
    • index.html
    • about.html
    • contact.html
    • img/
      • image1.jpg
      • image2.jpg

If you have a lot of images, you can add subfolders to your images folder as well.

References

No references available.