CodeLab

Learn by reading real code

Examples and small projects from our lessons. Read the explanation, copy or download the code, run front-end examples live, and experiment in the Playground.

8Examples
2Projects
6Languages
6Live previews

Featured

Playground
Beginner Live preview

Professional Student Registration Portal

Build a Professional Student Registration Portal from scratch using only HTML, CSS & JavaScript. A hands-on project des…

HTMLCSSJavaScript
497 lines · 3 files View project
Beginner Live preview

A responsive profile card

Build a clean profile card with semantic HTML and a few lines of CSS.

HTML
25 lines View snippet
Beginner Live preview

Centre anything with Flexbox

The three lines of CSS that centre an element both ways.

CSS
16 lines View snippet

More examples 5

Intermediate Live preview

Array methods: map, filter and reduce

Transform, select and total a list of quiz scores without a single for loop.

JavaScript
13 lines View snippet
Intermediate Live preview

Login page: HTML, CSS, JavaScript, PHP and MySQL

A complete sign-in page: the form, its styling, friendly checks in the browser, secure PHP and the users table.

HTMLCSSJavaScriptPHPSQL / MySQL
134 lines · 5 files View project
Intermediate Live preview

Handle a form safely in PHP

Read, validate and escape form input before showing it back to the visitor.

PHP
22 lines View snippet
Intermediate Code only

Average quiz score per course with JOIN and GROUP BY

Combine two tables and summarise the results.

SQL / MySQL
9 lines View snippet
Beginner Code only

FizzBuzz in Python

The classic loop exercise, written clearly.

Python
9 lines View snippet
Hi there! 👋 Have a question about the courses or joining the class? Ask me.