Introduction
In order to turn your local HTML/CSS project into a “live” website, you need to upload it to a server. We will use Github pages (a free option that also allows us to familiarize ourselves with a very popular platform: Github).
What is Github?
GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. Learn more about the Github platform and how to use it to share and edit files here.
You can use GitHub Pages to host a website about yourself, your organization, or your project directly from a GitHub repository. You can read more about Github Pages here.
Steps to upload your project
- Make sure all your files for the project are correctly organized and named: The home page should be
index.html
, and none of your file names should include spaces. The project should include at least five.html
files, one.css
file, and images (.jpg
,.jpeg
,.png
,.gif
, or.svg
) - Go to github. com and create a free account (or login if you already have one).
- Click the Start a project button
- On the Create a new repository page:
- Name your repository in the Repository name box (i.e: adventure)
- In the Initialize this repository with section, check the Add a README file box.
- Click the Create repository button
- Your newly created repository is displayed on the next page
- Upload your files:
- Click the Add file button at the top and select Upload files
- Drag and drop all the files comprising your project
- Make sure Commit directly to the main branch is checked
- Click the Commit changes button
- Turn your repository into a website:
- Go to Settings
- Select Pages in the left hand side menu
- Click button under the Source section, select main
- Click the Save button
- Your files are now on the web, ready to be viewed. To access them, enter the correct URL: yourUserName.github.io/repositoryName/index.html