HTML and CSS
You'll start with a bare HTML page and add text, links, images, structure and forms, then style it with CSS, from colours and the box model to flexbox and grid layouts. You'll finish by building your own responsive portfolio or small business site that looks good on phones and laptops alike.
12 modules · 53 lessons · about 20 hours · Beginner
What you'll be able to do
Build and style my own web pages from scratch with HTML and CSS, and make them look good on phones as well as on a laptop.
- Write a working HTML page from scratch and see how the browser turns tags into what you see.
- Fill a page with headings, paragraphs, lists, links and images that make sense to people and browsers.
- Organise a whole page into meaningful regions so it reads well for everyone, including screen reader users.
- Build contact and sign-up forms that collect information clearly and check it before it is sent.
- Connect a stylesheet to your page and learn how CSS decides which styles win.
- Give your page a look of its own with fonts, colours, backgrounds and interactive states for links and buttons.
- Control the size and spacing of every element with content, padding, border and margin.
- Line things up in rows and columns, such as navigation bars, cards and buttons, with flexbox.
- Lay out whole pages and galleries in two dimensions with CSS grid.
- Take elements out of the normal flow to build sticky headers, badges and overlays.
- Make your pages adapt from phone to laptop with the viewport tag, fluid sizes and media queries.
- Plan, build and polish a portfolio or small business site from scratch, then put it online.
Course outline
1Your first web page
- What HTML is and your first page
- Elements, attributes and nesting
- The full page skeleton
2Text, links and images
- Headings, paragraphs and emphasis
- Ordered, unordered and nested lists
- Links between pages and sections
- Images, figures and file paths
- Build an about-me page
3Structuring a page with semantic HTML
- Page regions: header, nav, main and footer
- Sections, articles, asides, div and span
- Simple data tables
- Accessible, valid markup
4Forms
- How forms work: form, input and label
- Choosing the right input type
- Text areas, dropdowns and buttons
- Built-in form validation
- Build a contact form
5CSS basics: rules, selectors and the cascade
- Your first stylesheet
- Selecting elements by type, class and id
- Combining selectors
- The cascade, specificity and inheritance
- Debugging styles with dev tools
6Styling text, colour and backgrounds
- Fonts and web fonts
- Text size, spacing and alignment
- Colour and contrast
- Backgrounds and gradients
- A colour palette with custom properties
- Styling links, buttons and form controls
7The box model
- Every element is a box
- Sizing boxes with box-sizing
- Margins, collapsing and centring
- Block, inline and inline-block
- Build a card with rounded corners and shadows
8Layout with flexbox
- Your first flex container
- Aligning items with justify-content, align-items and gap
- Wrapping, growing and shrinking
- Flexbox patterns you'll use everywhere
9Layout with grid
- Your first grid: columns, rows and fr
- repeat(), minmax() and placing items
- Page layouts with grid-template-areas
- Card galleries and choosing grid or flexbox
10Positioning and layering
- Relative and absolute positioning
- Fixed, sticky and z-index
- Positioning patterns: badges, overlays and sticky headers
11Making pages work on phones
- The viewport and fluid widths
- Responsive images
- Media queries and mobile-first CSS
- Fluid type, tap targets and testing
- Make a layout work on every screen
12Project: your own responsive site
- Plan your site and write its HTML
- Style your site: palette, type and components
- Lay out your site from phone to laptop
- Final checks and putting your site online
How you'll learn
- Write and run real code in your browser. Nothing to install.
- Short lessons that build on each other, so every step makes sense.
- A tutor you can ask anytime. It knows the lesson you're on.
- Quick checks along the way, so you know it stuck.
Questions
How do I get HTML and CSS?
It comes with any paid plan, along with every other course in the catalogue. Sign up, pick a plan and start.
Do I need any experience?
No. It starts from zero and explains each new idea as it comes up.
How long does it take?
53 lessons in all, about about 20 hours in total. Go at your own pace: your progress is saved.
What if I get stuck?
Ask the tutor. It knows the lesson you're on and explains things another way until it clicks.
Can I learn on my phone?
Yes. Lernelle works in any browser, on your phone, tablet or computer.
Does it stay up to date?
Yes. We update the course when things change, and you can bring the new version into yours with one click.
Ready to start?
Pick a plan and this course is yours, with everything else in the catalogue.