Mini project
Personal Portfolio Website with HTML and CSS
A responsive personal portfolio with about, skills, projects and contact sections, built with semantic HTML and modern CSS, and published free on GitHub Pages.
HTMLCSSFlexboxGridGitHub Pages
The problem
Recruiters often look at a candidate's projects before an interview. A portfolio site gives every student one link to share that shows who they are, what they can do and where their code is. It is also a good first web project because you will keep improving it for years.
Features to build
- Header with your name, a one-line introduction and navigation links to each section
- About section with a photo and a short paragraph
- Skills section grouped by area, for example languages, web and tools
- Projects section with a card for each project: title, description, tech used and links to code and live demo
- Contact section with email and profile links
- Responsive layout that works from a phone to a wide screen
- Accessible: semantic elements, alt text on images and good colour contrast
Build plan
- 1
Plan the content
Write the text for each section first: introduction, about, three projects and contact. Good content matters more than effects.
- 2
Write semantic HTML
Use header, nav, main, section, article and footer, with one h1 and h2 headings for sections.
- 3
Lay out with Flexbox and Grid
Use Flexbox for the navigation and Grid for the project cards, with repeat(auto-fit, minmax(...)) so cards wrap on small screens.
- 4
Make it responsive
Start with the mobile layout and add media queries for wider screens. Test in the browser's device toolbar.
- 5
Polish
Use CSS custom properties for colours and spacing, add hover and focus styles, and compress images.
- 6
Publish
Push the site to a GitHub repository and turn on GitHub Pages. The guided portfolio project lesson walks through every step.
Learn these first
Each part of the project is taught in one of these free lessons.
- Semantic HTML: What It Is and Why It Matters
- HTML Page Layout Elements: header, nav, main, section, article, aside and footer
- HTML Accessibility: Building Pages Everyone Can Use
- CSS Flexbox: A Complete Beginner's Guide with Examples
- CSS Grid Layout: A Complete Beginner's Guide with Examples
- Responsive Web Design: Fluid Layouts, Mobile First and Flexible Images
- CSS Media Queries: Breakpoints, min-width, max-width and Media Features
- Project: Publish a Portfolio Website with GitHub Pages
Make it stand out
- A dark mode that follows the system setting
- A contact form using a free form service
- A downloadable résumé PDF
- A custom domain name
Viva and interview questions
Try to answer each one aloud before you open it.
What is semantic HTML and why did you use it?
Semantic elements like
nav,mainandarticledescribe what the content is. Screen readers and search engines understand the page better, and the code is easier to read.When did you use Flexbox and when Grid?
Flexbox lays items out in one direction, which suits the navigation bar. Grid handles rows and columns together, which suits the project cards.
What does mobile-first mean?
I wrote the styles for small screens first, then added
min-widthmedia queries for larger screens. Phones load the simplest styles, and the layout grows as space increases.Why does every image need alt text?
Screen readers read the alt text to people who cannot see the image, and it shows if the image fails to load. Decorative images get an empty alt so they are skipped.
How is the site hosted for free?
GitHub Pages serves the files from a repository as a website. Every push to the main branch updates the live site.
What to put in your project report
- Abstract: the problem, your solution and the result in one paragraph.
- Introduction and problem statement: who has the problem and why it matters.
- Requirements: the features (functional) and qualities such as speed and security (non-functional).
- Design: architecture diagram, database tables or data flow, and screen layouts.
- Implementation: the main modules and the most interesting code, explained.
- Testing: the test cases you ran, with inputs, expected and actual results.
- Results: screenshots or numbers that show the project working.
- Conclusion and future scope: what you achieved and what you would add next.
Your college may give its own format. Follow that first, and use this list to check nothing is missing.
More project ideas
- Quiz App with HTML, CSS and JavaScriptMini project
- Snake Game with JavaScript and CanvasMini project
- Typing Speed Test with JavaScriptMini project