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.
Create
index.htmlwith just the basic HTML skeleton and an<h1>. Stage and commit it:git add index.html git commit -m "Add index.html skeleton"Add the intro paragraph and post links to
index.html. Stage onlyindex.html:git add index.html git commit -m "Add intro and post links"Create
about.htmlwith your about content. Stage and commit it separately:git add about.html git commit -m "Add about page"Add a
<link>to a newstyles.cssfile 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"Copy the stylesheet link into
about.htmlso 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 withgit commit -m "Fix typo", and checkgit logagain. - Run
git add .once on purpose with multiple changed files, then usegit 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.