
The problem
Employers and clients want proof, not promises. A simple, fast website with your projects is the first proof.
What you will learn
- Write semantic HTML and responsive CSS
- Track every change with Git
- Publish free with GitHub Pages
- Check speed and accessibility
What you will build
A fast, clean personal website with your name, what you do, your projects and how to contact you, published on the internet for free with GitHub Pages. Anyone can open it on a phone or a laptop, and every change you make is saved in Git.
This is the final project of the Developer foundations path. It uses only HTML and CSS, so you can focus on structure, design and publishing.

This website is the first thing an employer or client sees. Simple and finished beats fancy and broken.
What you need
- A computer, internet, a code editor and Git (Your first commit, explained sets them up).
- A free GitHub account.
- Three things to show. No projects yet? Show the exercises from this site, and add projects as you build them.
The finished folder
portfolio/ ├── index.html ├── styles.css ├── images/ │ └── me.jpg (your photo, added in Step 7) └── README.md
Step 1: Create the project and repository
In a terminal (Git Bash on Windows), make the project inside your learning workspace and turn it into a repository:
mkdir -p ~/ewoi-learning/portfolio/images cd ~/ewoi-learning/portfolio git init
You should see Initialized empty Git repository in .../portfolio/.git/. Work in ~/ewoi-learning/portfolio for the whole project: open this folder in your code editor, and create every file below inside it.
Step 2: The page structure (HTML)
HTML describes what each part of a page is: a heading, a paragraph, a list, a link. Using the right element (called semantic HTML) helps screen readers, search engines and you. Create index.html:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Amina Otieno, web developer</title>
<meta name="description" content="Amina Otieno builds fast, accessible websites with Laravel. Projects, skills and contact.">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="wrap">
<p class="kicker">Web developer, Nairobi</p>
<h1>Hi, I am Amina. I build fast, simple websites.</h1>
<p>I am learning Laravel and building projects every week.</p>
<a class="button" href="#projects">See my projects</a>
</header>
<main class="wrap">
<section id="projects">
<h2>Projects</h2>
<article class="card">
<h3>Task tracker</h3>
<p>A Laravel app where each person manages their own tasks.</p>
<a href="https://github.com/your-username/task-tracker">Code on GitHub</a>
</article>
</section>
<section id="skills">
<h2>Skills</h2>
<ul>
<li>HTML and CSS</li>
<li>Git and GitHub</li>
<li>SQL</li>
</ul>
</section>
<section id="contact">
<h2>Contact</h2>
<p>Email me at <a href="mailto:[email protected]">[email protected]</a>.</p>
</section>
</main>
<footer class="wrap"><p>Built by hand and published with GitHub Pages.</p></footer>
</body>
</html>
| Line | Why it is there |
|---|---|
<html lang="en"> |
Tells screen readers and search engines the language |
<meta name="viewport" ...> |
Makes the page fit phone screens instead of showing a tiny desktop page |
<title> and <meta name="description"> |
What search results show; write them for a human |
<header>, <main>, <section>, <footer> |
Name the parts of the page, so assistive technology can jump between them |
href="#projects" |
Jumps to the element with id="projects" on the same page |
Replace the example name, text and links with your own. Open index.html in your browser (double-click it) to see it.
Step 3: The look (CSS)
CSS describes how things look. Create styles.css next to index.html:
:root {
--ink: #0b0f19;
--paper: #f8faf4;
--accent: #c6ff00;
--muted: #64748b;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: system-ui, sans-serif;
font-size: 1.0625rem;
line-height: 1.6;
color: var(--ink);
background: var(--paper);
}
.wrap { max-width: 720px; margin: 0 auto; padding-inline: 16px; }
header { padding-block: 64px 32px; }
h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; margin: 8px 0 16px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); }
.button {
display: inline-block;
padding: 12px 20px;
border: 2px solid var(--ink);
border-radius: 6px;
background: var(--accent);
color: var(--ink);
font-weight: 700;
text-decoration: none;
}
.card { border: 2px solid var(--ink); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
a { color: var(--ink); overflow-wrap: anywhere; }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
footer { padding-block: 32px; color: var(--muted); }
What the less obvious parts do:
:rootvariables (--ink,--accent) keep your colours in one place. Change the accent once and the whole site follows.box-sizing: border-boxmakes widths include padding and borders, which avoids many layout surprises.max-width: 720pxkeeps lines short enough to read comfortably on large screens, andpadding-inlinekeeps a gap at the left and right edges on phones. It sets only the sides, so thepadding-block(top and bottom) on the header and footer still applies.overflow-wrap: anywhereon links andmax-width: 100%on images stop a long address or a big photo from pushing the page wider than a phone screen.clamp(2rem, 6vw, 3rem)makes the heading grow with the screen, but never smaller than2remor larger than3rem.:focus-visibleshows a clear dark outline when someone uses the keyboard, so everyone can use your site. The outline uses the dark ink colour because the lime accent is almost invisible against the light background.
Reload index.html in your browser: the page now has colours, a lime button and cards. If it still looks plain, check that styles.css is in the same folder as index.html and the name matches exactly. Commit your work:
git add index.html styles.css git commit -m "Add portfolio page and styles"
Step 4: Check it on a phone size
In your browser, open developer tools (F12), click the phone and tablet icon (device toolbar), and choose a phone. Check that:
- Nothing needs sideways scrolling.
- Text is readable without zooming.
- Buttons and links are easy to tap.
Step 5: Publish with GitHub Pages
- On GitHub, create a new public repository named
portfolio. Do not add a README (you already have files). - Connect your folder and push (GitHub shows these commands after you create the repository; use your own username):
git branch -M main git remote add origin https://github.com/your-username/portfolio.git git push -u origin main
| Command | What it does |
|---|---|
git branch -M main |
Names your branch main, the name GitHub expects (harmless if it already is) |
git remote add origin ... |
Saves the GitHub address under the short name origin |
git push -u origin main |
Uploads your commits; -u links your main to GitHub's main, so next time plain git push is enough |
When Git asks for a password over HTTPS, paste a personal access token, not your GitHub password (GitHub does not accept account passwords for Git). If you set up an SSH key instead, use the SSH address [email protected]:your-username/portfolio.git. If the push is refused, read the first error line: "Authentication failed" means the token or key, "Repository not found" means a typo in the address (check it with git remote -v), and "rejected" usually means the GitHub repository was created with a README: delete that new repository on GitHub (Settings, at the bottom) and create it again without one.
-
On GitHub, open the repository's Settings, then Pages. Under "Build and deployment", set Source to Deploy from a branch, branch main, folder / (root), and save.
-
After a minute or two, the Pages settings show your site's address, like
https://your-username.github.io/portfolio/.

If the page shows a 404 at first, wait two minutes and refresh. Publishing takes a moment the first time.
Ask your AI assistant
I published a portfolio with GitHub Pages and it shows [what you see] at [your address]. My repository has these files: [list them]. Walk me through the likely causes in order, explaining each check.
Step 6: Write the README
Your repository's README is its front page. Create README.md:
# Portfolio My personal website: who I am, my projects and how to contact me. Live: https://your-username.github.io/portfolio/ ## Built with HTML and CSS, published with GitHub Pages. ## What I learned - Semantic HTML and why it helps accessibility - Responsive CSS with a max width and clamp() - Publishing with Git and GitHub Pages
git add README.md git commit -m "Add README" git push
Step 7: Check quality
- Speed: in Chrome's developer tools, run Lighthouse for mobile. Aim for 90 or more in Performance, Accessibility and SEO.
- Images: resize your photo to about 600 pixels wide, save it as a compressed JPEG named
me.jpgin theimagesfolder, and add it under the<h1>inindex.html:
<img src="images/me.jpg" alt="Amina smiling, in front of a laptop" width="600" height="600">
| Part | Why |
|---|---|
src="images/me.jpg" |
The path from index.html to the photo. Capital letters must match exactly on GitHub Pages |
alt="..." |
Describes the photo for screen readers and when it fails to load |
width and height |
Your photo's real size in pixels, so the page saves the space and does not jump while loading |
- Links: click every link.
Then commit and publish the update. GitHub Pages republishes by itself after every push:
git add index.html images/me.jpg git commit -m "Add my photo" git push
Ideas to make it yours
- A dark mode with
@media (prefers-color-scheme: dark). - A short "What I am learning now" section you update monthly.
- Your own domain name later, pointed at GitHub Pages.
Recap
- HTML for structure, CSS for looks; semantic elements help everyone.
- A viewport tag and a max width make the site work on phones.
- Git saves every change; GitHub Pages publishes free.
- A clear README turns a repository into proof of your skills.
Want feedback on your portfolio from a working engineer? Book a one-to-one session.


