Time to practice. You'll build a tiny two-page site and use Git to track every step.

Setup

Create a new folder (separate from earlier practice if you like):

mkdir git-blog-practice
cd git-blog-practice
git init

Requirements

Build a minimal blog with two HTML files. Use what you learned in the HTML module.

index.html

  • A title for your blog
  • A short intro paragraph
  • Links to at least two "posts" (they can be separate HTML files or sections on the same page — your choice)
  • A link to about.html

about.html

  • Your blog name
  • A few sentences about you (real or fictional)

Git Requirements

Complete these steps in order. After each step, run git status before moving on.

  1. Create index.html with just the basic HTML skeleton and an <h1>. Stage and commit it:

    git add index.html
    git commit -m "Add index.html skeleton"
    
  2. Add the intro paragraph and post links to index.html. Stage only index.html:

    git add index.html
    git commit -m "Add intro and post links"
    
  3. Create about.html with your about content. Stage and commit it separately:

    git add about.html
    git commit -m "Add about page"
    
  4. Add a <link> to a new styles.css file and create the CSS with at least two rules (e.g. font and heading color). Stage both files in one commit:

    git add index.html styles.css
    git commit -m "Add basic styling"
    
  5. Copy the stylesheet link into about.html so both pages share styles. Stage and commit:

    git add about.html
    git commit -m "Apply styles to about page"
    

Check Your Work

When finished, run:

git status

You should see nothing to commit, working tree clean.

View your commit history:

git log --oneline

You should see five commits, each with the message you wrote. That's a clean, readable history — exactly what Git is for.

Bonus

  • Make a small typo fix on one page. Stage it with git add, commit with git commit -m "Fix typo", and check git log again.
  • Run git add . once on purpose with multiple changed files, then use git restore --staged <file> to unstage one file before committing.

Nice work. You can now initialize a repo, check status, and stage changes with confidence. The next lessons cover commits, history, .gitignore, branches, and GitHub.