The complete, free course

Learn Salam

This course covers the whole language, from your first program to the advanced parts, in short lessons that build on each other. Every lesson has complete programs with the output they actually produce; copy them and run them in the online editor.

Getting started

Control flow

Functions

Data and types

Larger programs

Layout language

Web pages

27
Pages and textThe shape of a page, headings, paragraphs, line breaks and every text level element: emphasis, quotes, code, edits, dates, abbreviations and mixed direction text
28
Page structure and listsLandmarks such as header, nav, main and footer, then lists, definition lists, details, dialogs, figures and addresses, and how to build a whole blog page from them
29
Links, images and mediaLinks and anchors, images with alt text and responsive sources, image maps, audio and video with subtitles, frames, embeds, canvas, SVG and math
30
TablesTables for data: caption, header, body and footer sections, heading cells with scope, spanning cells, column groups, and how to style and scroll a table
31
FormsForms and every form control: labels, all the input types, validation, text areas, checkboxes, radio buttons, lists, buttons, output, progress and meters, files, and handling a submit in code
32
Head, scripts and global attributesThe settings of the page, the head with meta and links, scripts, templates and shadow trees, the attributes every element has, ARIA, data attributes and splitting a site into files
33
Values, units and the boxWriting values in the page language: numbers, percent, units, comma lists, colours, and the box with padding, border, margin, size and overflow
34
Text and fontsText properties of the page language: font, size, weight, colour, alignment, line height, decoration, clipping and shadows
35
Colours and backgroundsBackgrounds in the page language: colours, gradients, images, opacity, filters and transforms
36
Borders, radius and shadowsBorders, rounded corners, outlines and shadows in the page language
37
Layout: row, column, grid and stackPlacing children with layout, gap, align, justify, grow, wrap, grid columns and stack
38
Fluid layoutsPages that adapt to the room they get: percent, fill, wrap, min and max sizes and grids that count their columns
39
States and transitionsStyles for hover, focus, active and disabled, and smooth changes with transition
40
State, lists and componentsMaking a page react: state with :=, events, if and each, components, and other properties for the pointer and scrolling
41
Mouse eventsMaking a page react to the mouse: handlers, click, double click, other buttons, the context menu, pointer position, drawing, enter and leave, bubbling and the wheel
42
Keyboard and formsKeys, focus, typing, text selection, form submit, reset and validation, the clipboard, details, popovers and dialogs: the events of every part of a page that people type into
43
Drag, touch, scroll and windowDrag and drop between lists, pointer and touch events, scroll and window events, and the load, error and abort events of images
44
Media, animation and other eventsAudio and video events, a custom player, animation and transition events, slot changes, captions, canvas context loss and security policy violations
45
State, the DOM and timersHow the pieces of an interactive page fit: state in variables, reading and changing elements, classes and styles, creating and removing elements, timers, storage, dialogs, components with handlers and how to debug
46
Whole pages: six projectsSix complete pages that bring the lessons together: a landing page, a blog post with a sidebar, a sign up form with live checks, a dashboard with a CSS bar chart, a task list that remembers, and a photo gallery with a lightbox, plus how a Salam program serves a page

Reference

Server and deployment

Reference

Design system

This course is about the language itself. For the standard library (files, text, numbers, networking and the rest) see the library reference.

Library