By the end of this lesson you will be able to
- Build a one-page personal site with semantic HTML and a stylesheet.
- Check the page for accessibility: headings, alt text, contrast, keyboard use and zoom.
- Compare GitHub Pages, Netlify and Vercel as places to publish a static site.
- Publish the page and confirm it loads over HTTPS from its public address.
- Decide what personal information should never go on a public page.
This is the project that brings the whole programming path together. You will write a small personal page, test it, and put it on the internet at an address anyone can open. Publishing is easier than most people expect, because a simple page is only a few files. It also brings a responsibility: once a page is public, strangers can read it, so you will decide carefully what goes on it. Use a made-up persona if you prefer; the skills are identical.
Plan before you build
Decide the purpose first. A personal page might introduce you, list a hobby or skill, or show a small portfolio. Write down three sections, such as About, What I am learning and Contact, and a short sentence for each. Sketch the order on paper. Planning for five minutes avoids rewriting later, in the same way that the flowcharts you drew earlier helped you plan an algorithm.
Build the page
Create a folder called personal-site with index.html and style.css inside it. This page uses the semantic elements from the HTML lessons (header, main, section, footer), one h1, headings in order, a descriptive alt for the image, a viewport line so it works on phones, and a language on the html element so screen readers pronounce it correctly. Write your own words and replace the fictional content.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Amina Wanjiru - Garden notes</title>
<meta name="description" content="Amina's page about learning to grow vegetables and to code.">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Amina Wanjiru</h1>
<p>Learning to grow vegetables and to build web pages.</p>
</header>
<main>
<section id="about">
<h2>About me</h2>
<p>I keep a small vegetable plot and I am teaching myself computing. This page is my first website.</p>
</section>
<section id="learning">
<h2>What I am learning</h2>
<ul>
<li>HTML for structure</li>
<li>CSS for looks</li>
<li>JavaScript for behaviour</li>
</ul>
</section>
<section id="contact">
<h2>Contact</h2>
<p>Email me at <a href="mailto:amina@example.com">amina@example.com</a>.</p>
</section>
</main>
<footer>
<p>Made by Amina. Last updated October 2026.</p>
</footer>
</body>
</html>body {
font-family: Arial, Helvetica, sans-serif;
font-size: 1.125rem;
line-height: 1.6;
color: #222222;
background-color: #f6faf6;
margin: 0;
}
header, main, footer {
max-width: 40rem;
margin: 0 auto;
padding: 1rem;
}
header {
background-color: #1b5e20;
color: #ffffff;
max-width: none;
}
header h1, header p {
max-width: 40rem;
margin-left: auto;
margin-right: auto;
}
h2 {
color: #1b5e20;
}
a {
color: #0b4f9c;
}
a:focus {
outline: 3px solid #e65100;
outline-offset: 2px;
}
footer {
border-top: 1px solid #cccccc;
font-size: 0.9rem;
}AMINA WANJIRU
Learning to grow vegetables and to build web pages.
About me: I keep a small vegetable plot...
What I am learning: HTML, CSS, JavaScript
Contact: amina@example.com
Made by Amina. Last updated October 2026.
- Marker 1: header: name and tagline
- Marker 2: main: one section per topic
- Marker 3: footer: maker and date
Read this figure as text
A simulated browser window with the personal page: green header, three sections and a footer.
A simulated browser window with the address file:///home/amina/personal-site/index.html. The page has a dark green header with the name Amina Wanjiru and a one-line description. Below it are three sections: About me with a paragraph, What I am learning with three bullet points, and Contact with an email link. At the bottom is a footer with the maker's name and the update date. Marker 1 is the header, marker 2 the main sections and marker 3 the footer.
Check it before you publish
Open the page in your browser and work down this list. It takes ten minutes and catches most problems. The first four are accessibility checks, which help everyone, including people using screen readers or magnification, and are good practice for any page you publish.
| Check | How to test it | Pass looks like |
|---|---|---|
| Headings in order | Read only the h1 and h2 lines | One h1, then h2 sections, no skipped levels |
| Image alt text | Hover or read the alt attributes | Each meaningful image says what it shows; decorative ones use alt="" |
| Colour contrast | Squint at the page; try a contrast checker | Text is easy to read against its background |
| Keyboard use | Press Tab repeatedly | Every link gets a visible outline, in a sensible order |
| Zoom and phone width | Press Ctrl and + several times; narrow the window | Text grows, nothing is cut off, no sideways scrolling |
| Links work | Click every link | No 404 errors; the email link opens your mail app |
| Console is clean | Press F12 and open the Console | No red errors |
| Private details | Read every line as a stranger | Nothing you would not want public |
Where to publish
Your page is a static site: only ready-made files, no database and no program running on the server. That is the easiest kind to host, and several services give you a free plan for it. Free plans and screens change over time, so treat the steps below as the shape of the process and follow the host's current help page.
- Files live in a GitHub repo
- Switch on Pages in Settings
- username.github.io/repo-name
- Drop the site folder on Netlify Drop
- Or connect a Git repo
- Address ends in netlify.app
- Import a Git repo
- Republishes after each push
- Address ends in vercel.app
Read this figure as text
Three columns comparing GitHub Pages, Netlify and Vercel by how you upload and what address you get.
Three columns. GitHub Pages: you keep the files in a GitHub repository and switch on Pages in the repository settings; the address looks like username.github.io/repository-name. Netlify: you can drag your site folder onto a web page, called Netlify Drop, or connect a Git repository; you get a generated address ending in netlify.app. Vercel: you connect a Git repository and it publishes automatically after each push; the address ends in vercel.app. All three serve over HTTPS and offer a free plan, with terms that can change.
The simplest option is Netlify Drop: sign in, open the drop page, drag the whole personal-site folder onto it and the host gives you an address. To use GitHub Pages, create a GitHub repository, push your project to it (see the Git lesson), then open the repository's Settings, choose Pages, set the source to deploy from the main branch at the root folder, and wait a minute or two. To use Vercel, sign in, choose to add a new project, import the repository and accept the defaults for a plain HTML site. Names of menus move around between releases, so follow the on-screen wording.
Publish with GitHub Pages
Step 1: Commit your site
In
personal-siterungit init,git add .,git commit -m "First version of my page"andgit branch -M main.You should see:
git log --onelineshows your commit.Step 2: Create the online repository
On github.com choose to create a new repository, name it for example
personal-site, make it public, and do not add extra files.You should see: GitHub shows a page with instructions and an empty repository.
Step 3: Push your code
Run the two lines GitHub shows:
git remote add origin <the address it gives you>andgit push -u origin main. Sign in the way GitHub asks.You should see: Your files appear in the repository on the website.
Step 4: Switch on Pages
In the repository open Settings, then Pages. Under the build and deployment section choose to deploy from a branch, select
mainand the root folder, then save.You should see: After a minute or two a banner shows the address of your live site.
Step 5: Open and test the address
Open the address in a private window and on your phone.
You should see: The page loads, the address starts with
https://and a padlock appears.
Addresses, domains and basic web security
A free host gives you an address on its own domain, which is perfectly good for a personal page. If you later want a name such as aminagarden.example, you buy the name from a domain registrar for a yearly fee and point it at your host; the host's help pages explain the steps. The registrar and the host are separate companies. Do not rush this: free addresses are enough to learn and to share a page.
https://ProtocolEncrypted connectionamina-demoAccountYour GitHub name.github.ioHost domainOwned by the service/personal-site/ProjectRepository nameRead this figure as text
The fictional address https://amina-demo.github.io/personal-site/ split into protocol, account, host and project path.
The fictional address https://amina-demo.github.io/personal-site/ is split into parts. https:// is the protocol: the connection is encrypted. amina-demo is the account name chosen at GitHub. .github.io is the domain owned by the host. /personal-site/ is the repository name, which is where your page lives. The index.html file is shown automatically.
Basic safety for a static page comes down to a few habits. Serve the page over HTTPS, which these hosts do automatically. Keep passwords and tokens out of your files and out of Git. Do not add forms that collect people's details unless you use a trusted form service and know what it does with the data. Load scripts only from sources you trust, and keep your hosting and GitHub accounts protected with a strong Passphrase and multifactor authentication. Finally, tell the world only what you meant to.
Read this figure as text
A sequence between you, GitHub, the host and a visitor showing push, deploy and viewing.
Four actors: You, GitHub, Host and Visitor. 1: You push a new commit to GitHub. 2: GitHub tells the host there is a new version. 3: The host copies the new files to its servers. Later, 4: a Visitor asks the host for your address. 5: the host sends back the latest page over HTTPS. Updates are normally live within a minute or two.
Common mistakes
✖ Instead of: Publishing a page containing a home address, phone number or children's photos.
✔ Do this: Keep private details off public pages. Use a project email address and share the rest privately.
✖ Instead of: Naming the home page
Home.htmlorindex.htm.txt.✔ Do this: Call it exactly
index.htmland check that your editor did not add.txt.✖ Instead of: Skipping alt text because the picture is obvious to you.
✔ Do this: Describe each meaningful image in the
altattribute so everyone gets the information.✖ Instead of: Testing only on your laptop.
✔ Do this: Open the public address on a phone and in a private window too.
If something goes wrong
- The published page has no styling.
- The stylesheet link is probably wrong or the file was not uploaded. Open the Network panel (F12), refresh, and look for a red 404 on
style.css. Fix the file name, capitals and folder in thehref, commit, push. - GitHub Pages says the site is not published yet, or shows 404.
- Wait a few minutes. Then check Settings, then Pages, for the correct branch and root folder, and that
index.htmlis at the top of the repository, not inside a subfolder. - My change does not appear on the live page.
- Confirm you committed and pushed. Wait a minute or two for the host to rebuild, then do a hard refresh with Ctrl+Shift+R, or open a private window.
git pushasks for a password and refuses my account password.- GitHub does not take account passwords for command-line pushes. Follow the sign-in method GitHub's help page describes, such as a browser sign-in or a personal access token, and never paste a token into a file in your project.
Key terms
- Static site
- A website made of ready-written files (HTML, CSS, JavaScript, images) that the server sends unchanged.
- Deployment
- Putting your finished site on a server so other people can reach it on the internet.
- HTTPS
- The secure version of HTTP, which encrypts what passes between you and a website.
- Domain name
- The readable name of a website, such as example.com.
- Hosting
- A service that keeps a website's files on a server so people can visit it.
Practise it for real
Reading is not the same as being able to do it. Complete these on your own computer, then tick only what you have actually done. These ticks are your own honest record: nothing checks them for you.
Build and check your page
Create personal-site with index.html and style.css. Write your own content in three sections, with only information you are happy for the public to see. Work through the pre-publication checklist and fix anything that fails.
Challenge: publish and test on a phone
Choose one host and publish your page without step-by-step help, using the host's own help page. Open the public address on a different device. Then change one sentence, republish, and confirm the change appears.
Knowledge check
6 questions. You need 80% to pass. Mistakes here are part of learning, and you can retry as often as you like.
Summary
- Plan sections first, then build with semantic HTML and one stylesheet.
- Check headings, alt text, contrast, keyboard use, zoom, links and the console before publishing.
- A static site can be published free on GitHub Pages, Netlify or Vercel; the process matters more than the menu names.
- Pages are served over HTTPS and appear at the host's address; a custom domain is optional and costs money.
- Public means public: keep private details, passwords and tokens out of your site and repository.
Checklist: can you do these?
Marking a lesson as read does not prove you can do it. Skills count as demonstrated when you pass the quiz (not yet) and complete the practical tasks (not yet).
Related lessons
References and further reading
Official sources for details that can change between versions.
- GitHub Pages documentation (GitHub)
- Netlify documentation (Netlify)
- Vercel documentation (Vercel)
- Accessibility fundamentals (W3C Web Accessibility Initiative)