Webario rhino mascotWebario
🖌️

Design & Tools

Good code on an ugly page still looks bad. Learn the few design rules that matter most and the tools designers use, so your projects look professional.

1Layout and visual hierarchy

Hierarchy tells the eye where to look first. Make the most important thing the biggest, boldest or most colourful, and keep everything else quieter.

  • One main message per screen: a clear headline and one main button
  • Group related things close together and leave space between groups
  • Align elements to a grid so edges line up
  • Squint at your page: whatever you still see is your hierarchy
Try it. Screenshot a site you like and mark the 3 biggest things on it. Are they the 3 most important things? That is hierarchy at work.

2Colour that works

Start small: one main colour, one accent, and neutrals (white, greys, near-black). Use the main colour for buttons and links so users learn what is clickable.

styles.css — a simple palette
:root {
  --brand: #e63946;      /* main buttons and links */
  --accent: #f4a300;     /* highlights, badges */
  --ink: #1d1d1f;        /* body text */
  --muted: #6b6b73;      /* secondary text */
  --surface: #ffffff;    /* cards */
  --bg: #faf6ef;         /* page background */
}

.button {
  background: var(--brand);
  color: white;
}
Check contrast. Text must stand out from its background. Aim for a contrast ratio of at least 4.5:1 for body text (WCAG AA). Test your colours with a free contrast checker, and never use colour alone to show meaning.

Palette helpers: Coolors (generate palettes), Adobe Color (colour wheel rules) and Realtime Colors (preview a palette on a real page).

3Typography

Most of a website is text, so type choices matter more than anything else. Stick to two fonts at most: one for headings, one for body text.

styles.css — readable type
body {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;        /* 16px: never go smaller for body text */
  line-height: 1.6;       /* room between lines */
}

h1 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);  /* scales with screen size */
  line-height: 1.1;
}

p { max-width: 65ch; }    /* about 65 characters per line reads best */
  • Use a type scale: for example 1rem, 1.25rem, 1.5rem, 2rem, 3rem
  • Keep lines to roughly 50 to 75 characters wide
  • Bold and size create hierarchy; avoid ALL CAPS for long text
  • Free fonts: Google Fonts and Fontsource

4Spacing and consistency

Pick a spacing scale and reuse it everywhere. A common one is multiples of 8px: 8, 16, 24, 32, 48, 64. Consistent spacing is the cheapest way to look professional.

styles.css — spacing tokens
:root {
  --space-1: 0.5rem;  /* 8px  */
  --space-2: 1rem;    /* 16px */
  --space-3: 1.5rem;  /* 24px */
  --space-4: 2rem;    /* 32px */
  --space-6: 4rem;    /* 64px */
}

.card {
  padding: var(--space-3);
  border-radius: 16px;
}
.card + .card { margin-top: var(--space-3); }
Design tokens. Colours, fonts and spacing stored as named variables are called design tokens. Change one value and the whole site updates.

5Images, icons and file formats

Choosing the right format keeps pages sharp and fast.

FormatBest for
SVGLogos and icons. Scales to any size and is tiny.
WebP / AVIFPhotos on the web. Much smaller than JPG.
JPGPhotos when you need wide compatibility.
PNGGraphics that need a transparent background.
index.html — responsive, fast image
<img
  src="hero.webp"
  alt="A rhino coding on a laptop"
  width="800" height="600"
  loading="lazy"
/>
  • Always write meaningful alt text
  • Set width and height so the page does not jump while loading
  • Compress images before uploading (Squoosh, TinyPNG)
  • Free icons: Lucide, Heroicons. Free photos: Unsplash, Pexels

6The tools designers use

You do not need all of these. Start with one design tool, one image editor and one compressor. Free options are enough to build a full portfolio.

Figma

Free plan

Interface design, prototypes and handing designs to developers.

Penpot

Free

Open-source Figma alternative that works in the browser.

Canva

Free plan

Quick social posts, banners and thumbnails from templates.

Inkscape

Free

Vector graphics: logos and icons you export as SVG.

GIMP / Photopea

Free

Photo editing and cut-outs. Photopea runs in the browser.

Adobe Illustrator / Photoshop

Paid

Industry-standard vector and photo tools.

Affinity Designer / Photo

Paid

Paid-once alternative to Adobe for vector and photo work.

Squoosh / TinyPNG

Free

Shrink images before you put them on a site.

Start here. Sign up for Figma or Penpot, and use Canva for quick graphics. That covers most beginner needs for free.

7From design to code

A simple workflow when you build a page from a design:

Design-to-code workflow
1. Sketch the page on paper or in a free whiteboard
2. Build a quick layout in Figma or Penpot (mobile first)
3. Pick colours, fonts and spacing, then save them as tokens
4. Export icons and logos as SVG, photos as WebP
5. Build the HTML structure, then style it with your tokens
6. Compare your page to the design on a phone and a laptop
Dev Mode. Figma's Dev Mode and Penpot's inspect tab show exact sizes, colours and spacing, so you can copy the CSS values instead of guessing.

8Practice projects

  • Redesign the home page of a site you use daily, in Figma or Penpot
  • Make a logo in Inkscape and export it as an SVG favicon
  • Build a style guide page: your colours, fonts, buttons and spacing
  • Design three social posts in Canva that share one palette and font pair
  • Turn your design into a real HTML and CSS page

Keep learning design

  • Refactoring UI (book and tips) for practical visual design rules
  • Laws of UX for the psychology behind good interfaces
  • Figma's free Learn Design tutorials
  • Dribbble, Behance and Awwwards for inspiration
Next: build projects

Knowledge Check

Test what you learned. Each correct answer earns XP. up to 65 XP

1. What does visual hierarchy do on a page?

2. What is the minimum contrast ratio recommended for normal body text (WCAG AA)?

3. Which image format is best for a logo that must stay sharp at any size?

4. What are design tokens?

5. You want a free, browser-based tool to design a website layout and share it with a developer. Which fits best?