Ever wanted to showcase your HTML skills to the world? Hosting your HTML website on GitHub is an excellent way to do this. GitHub, the world's largest platform for version control and collaboration, offers a simple and free way to host your static websites. Let's dive into the step-by-step process of hosting your HTML website on GitHub.

Before we start, ensure you have the following: a GitHub account, a local HTML website ready to be uploaded, and a basic understanding of Git and GitHub.

Setting Up Your GitHub Repository
First, let's create a repository on GitHub where your HTML website will live.

1. Log in to your GitHub account and click on the '+' icon in the top-right corner. Select 'New repository'.
Naming Your Repository

1. Name your repository using your GitHub username followed by the name of your website, e.g., 'yourusername-website'.
2. Write a short description of your website and click 'Create repository'.
Initializing Your Local Repository

1. Navigate to your local HTML website folder in your terminal or command prompt.
2. Initialize a new Git repository by typing 'git init' and pressing Enter.
Connecting Your Local Repository to GitHub

Now, let's connect your local repository to the one you just created on GitHub.
1. Copy the repository URL from your GitHub repository page. It should look something like this: 'https://github.com/yourusername/yourusername-website.git'.




















Adding a Remote to Your Local Repository
1. In your terminal or command prompt, type 'git remote add origin' followed by the URL you copied earlier, and press Enter.
2. Verify that your local repository is connected to GitHub by typing 'git remote -v' and pressing Enter. You should see the URL you just added.
Pushing Your Local Website to GitHub
1. Add your HTML files to your local Git repository by typing 'git add .' and pressing Enter.
2. Commit your changes with a meaningful commit message, e.g., 'Initial commit of my website'. Type 'git commit -m "your message"' and press Enter.
3. Finally, push your local website to GitHub by typing 'git push -u origin main' (or 'master', depending on your default branch name) and pressing Enter.
Accessing Your Live Website on GitHub
GitHub will now host your HTML website at a unique URL. Let's find out how to access it.
1. Go to your repository page on GitHub.
Finding Your Website's URL
1. Click on the 'Settings' tab at the top of your repository.
2. Scroll down to the 'GitHub Pages' section and click the dropdown menu under 'Source'. Select 'main' (or 'master').
3. Click 'Save'. GitHub will now generate a URL for your live website. It should look something like this: 'https://yourusername.github.io/yourusername-website/'.
4. Click on this URL to view your live HTML website hosted on GitHub.
Congratulations! You've successfully hosted your HTML website on GitHub. Now you can share your creation with the world. Keep updating and improving your website, and don't forget to engage with the GitHub community. Happy coding!