Making websites
HTML, CSS and web accessibility, written by hand in a live editor that shows your page as you type and checks it before you move on.
Learning path
- 1
HTMLIntro10 unitsabout 176 min - 2
CSSBasic9 unitsabout 149 min - 3
Web accessibilityIntermediate6 unitsabout 139 min
Course map
Making websites · Courses: 3Writing pages by hand
These courses teach the code under a web page, not a site builder. Every page you open starts as a plain text file, and the first unit asks you to right-click a page, choose View Page Source and read the HTML the server sent. From there you write your own. Each unit has a live editor beside the reading: type, see the page change, and let the checker tell you whether the element or the style you were asked for is really there. Units end with 9 to 11 practice questions with explanations, and most add flashcards.
Small details that decide whether a page works
A text box next to the word "Email" is not labelled until a label element is tied to it. Until then a screen reader may announce only "edit text", and clicking the word does nothing. Give a box width: 200px, 16px of padding and a 2px border and by default it takes 236 pixels across the screen, not 200. Leave out one meta tag and many phones lay the page out as if the screen were much wider and shrink it, so your media query for phones never runs.
Checks you can run yourself
Unplug the mouse and press Tab. Every link, button and field should light up in turn, in reading order. Look at the headings alone; a screen reader user often jumps from one to the next, so a page without h2 elements reads like a book with no chapters. Measure your text colour too. Light grey #999999 on white has a contrast ratio of 2.85:1, well under the 4.5:1 that WCAG 2.2 asks for body text, and #bbbbbb is worse at 1.92:1.
Habits the courses push against
Writing alt text for every image the same way. A decorative swirl needs an empty alt, while a sales chart needs a full sentence saying what it shows. Reaching for ARIA first. The first rule of ARIA is to avoid it when a native element such as button already does the job, instead of adding a role to a div. Choosing a list element by looks. A recipe breaks if the steps change order and a shopping list does not, and HTML has a different element for each.
Questions about this subject
Is HTML a programming language?
HTML is a markup language that labels the parts of a document rather than running calculations or loops. It tells a browser that a piece of content is a heading, paragraph or link. A page can therefore have meaningful structure in HTML before any styling or interactive behaviour is added to it. HTML
What is the difference between HTML, CSS and JavaScript?
HTML identifies what the content is, CSS controls its appearance, and JavaScript supplies reactions to actions such as clicks or typing. Font choices and spacing belong to CSS rather than to the document’s meaning. Keeping these roles distinct helps explain why changing the way a paragraph looks is different from changing it into a heading. HTML
What is the DOM in a web page?
The browser parses HTML into a tree of objects called the Document Object Model, or DOM. An element becomes a node, and an element nested inside another becomes its child. CSS selectors and JavaScript act on this tree, so the arrangement of elements affects more than the order in which text appears in the source. HTML
Why does my page still display when I forget a closing tag?
Browsers apply repair rules from the HTML standard instead of simply refusing to display a broken document. The parser can still construct a DOM tree, but that repaired tree may differ from the structure you intended. A page looking roughly right is therefore not proof that its nesting and closing tags are correct. HTML
Is HTML5 still the latest version of HTML?
The current specification is the HTML Living Standard, maintained by WHATWG and updated continuously rather than issued with version numbers. W3C and WHATWG agreed in 2019 to work on this single standard. HTML5 remains a label used in books, but it does not describe a separate numbered release that replaces the continuously maintained document. HTML