HTML Tutorial
The language every web page is built with.
Getting started5 lessons
Text and links18 lessons
- 6Headings and ParagraphsWriting and structuring text.
- 7Text FormattingBold, italic, highlight, small, deleted and more.
- 8Quotations and Citationsblockquote, q, cite and abbr.
- 9HTML CommentsNotes the browser ignores.
- 10HTML ColorsNaming colours for text and backgrounds.
- 11HTML and CSSThree ways to add styles.
- 12LinksConnecting pages together.
- 13Link Targets and TypesOpening links in new tabs, email and phone links.
- 14Page BookmarksJump to a place on the same page.
- 15HTML HeadingsHTML has six heading levels, h1 to h6.
- 16HTML ParagraphsThe p element defines a paragraph.
- 17Line Breaks, hr and prebr breaks a line without starting a paragraph.
- 18Abbreviations, Address and Citationsabbr explains an abbreviation on hover, address marks contact details, cite names a work a.
- 19Strong, Em, Mark and Codestrong shows importance, em shows emphasis, mark highlights, small shows side text, del an.
- 20Link Colours and StatesLinks are blue, visited links purple and active links red by default.
- 21Links That Look Like ButtonsStyle an anchor as a button with padding, background and border radius.
- 22Email and Phone Linksmailto opens the email app and tel starts a call on phones.
- 23Download and Target LinksThe download attribute saves a file instead of opening it.
Images and media12 lessons
- 24ImagesShowing pictures with accessible descriptions.
- 25Responsive ImagesImages that fit every screen.
- 26Favicon and Page IconsThe small icon in the browser tab.
- 27Audio and VideoPlaying media without plugins.
- 28Image Width and HeightSet width and height so the browser reserves space and the page does not jump while loadin.
- 29Image as a Link and Floating ImagesPut an img inside an anchor to make a clickable image.
- 30Image MapsAn image map makes parts of one image clickable.
- 31Figure and Captionfigure groups content such as an image, diagram or code with an optional figcaption captio.
- 32HTML AudioThe audio element plays sound.
- 33HTML VideoThe video element plays video with controls.
- 34Embedding YouTube and MapsMany sites give embed code that uses an iframe.
- 35Object and Embedobject and embed include external content such as PDFs.
Page setup13 lessons
- 36The Page TitleTitles matter for tabs and search results.
- 37The head Element and Meta TagsInformation about the page itself.
- 38The Viewport Meta TagMaking pages scale correctly on phones.
- 39Character SetsWhy UTF-8 matters.
- 40File PathsPointing to other files correctly.
- 41Doctype and Document StructureEvery page starts with the doctype declaration so browsers use standards mode.
- 42The base and noscript Elementsbase sets one URL that all relative links use.
- 43Language and Text DirectionSet lang on html so screen readers pronounce text correctly and browsers translate properl.
- 44Tooltips with the title AttributeThe global title attribute shows a tooltip on hover.
- 45More HTML EntitiesEntities show reserved characters such as less than and ampersand, plus symbols such as co.
- 46Comments and Code HygieneComments are ignored by browsers.
- 47Common HTML MistakesFrequent errors: unclosed tags, duplicate ids, missing alt text, block elements inside inl.
- 48HTML Tag OverviewTags come in pairs with an opening and closing tag, or alone as void elements such as br, .
Lists and tables13 lessons
- 49ListsOrdered and unordered lists.
- 50Nested and Styled ListsLists inside lists, and list markers.
- 51Description ListsTerms and their descriptions with dl, dt and dd.
- 52TablesShowing data in rows and columns.
- 53Table Headers, Captions and SpansBetter tables with thead, tbody, caption, colspan and rowspan.
- 54Styling TablesBorders, spacing and zebra stripes with CSS.
- 55List Styles and TypesUnordered lists use list-style-type values such as disc, circle and square.
- 56Lists as NavigationMenus are lists of links.
- 57Table Borders and PaddingBorders belong to table, th and td.
- 58Table Caption, Head, Body and Footcaption titles a table.
- 59Zebra Striped and Hover TablesUse :nth-child(even) to stripe rows and :hover to highlight the row under the pointer.
- 60Responsive TablesWide tables break small screens.
- 61Table Alignment and Cell SizingUse text-align, vertical-align and width on cells.
Layout15 lessons
- 62Block and Inline ElementsHow elements flow on the page.
- 63The div and span ElementsGeneric containers for grouping.
- 64The class AttributeNaming groups of elements for styling.
- 65The id AttributeA unique name for one element.
- 66Semantic LayoutUsing elements that describe their meaning.
- 67Page LayoutArranging header, navigation, content and footer.
- 68Responsive Web DesignOne page that works on every screen.
- 69IframesEmbedding one page inside another.
- 70HTML and JavaScriptAdding behaviour with the script element.
- 71Header and Footerheader holds introductory content such as a logo and navigation.
- 72Section, Article and Asidesection groups related content under a heading.
- 73Float LayoutsBefore flexbox and grid, floats made columns.
- 74Flexbox LayoutFlexbox lays items in a row or column.
- 75CSS Grid LayoutGrid makes two dimensional layouts.
- 76Responsive Pages and Media QueriesThe viewport meta tag plus media queries adapt layout to screen size.
Characters and symbols4 lessons
Forms16 lessons
- 81FormsCollecting input from users.
- 82Form Attributesaction, method, name and autocomplete.
- 83Input TypesChoosing the right field.
- 84Input Attributesplaceholder, required, min, max, pattern and more.
- 85Select, Textarea and ButtonsDropdowns, multi-line text and submit buttons.
- 86Fieldset and Form ValidationGrouping fields and checking input in the browser.
- 87HTML FormsA form collects user input.
- 88Radio Buttons and CheckboxesRadio buttons with the same name let you choose one option.
- 89Select Lists and Option Groupsselect makes a dropdown with option items.
- 90Textarea and Datalisttextarea holds several lines of text with rows and cols.
- 91Date, Colour and Range InputsModern input types give native pickers: date, time, datetime-local, month, week, color, ra.
- 92File Uploadtype="file" lets users choose files.
- 93GET versus POSTGET puts data in the URL and is for searches and bookmarks.
- 94Readonly, Disabled and Hidden Fieldsreadonly shows a value users cannot change but still sends it.
- 95Placeholder, Autofocus and Autocompleteplaceholder shows a hint inside an empty field.
- 96Form Buttonsbutton type submit sends the form, reset clears it and button does nothing until JavaScrip.
Projects4 lessons
- 97Project: Personal Profile PageBuild a profile page using headings, an image, a list, links and a table.
- 98Project: A Blog LayoutUse header, main with articles, aside and footer to create a blog.
- 99Project: A Price TableBuild a price comparison with a table, header cells and a call to action.
- 100Project: Contact FormCombine labels, text inputs, an email field, a textarea and a button.
GraphicsPremium2 lessons
Best practicePremium3 lessons
Advanced HTMLPremium16 lessons
- 106Semantic LandmarksLandmark elements describe the role of each part of the page: header, nav, main, article, .
- 107Built in Form ValidationHTML can validate forms without JavaScript.
- 108datalist, fieldset, meter and progressdatalist offers suggestions for an input.
- 109The dialog Elementdialog is a built in modal or non modal window.
- 110details, summary and popoverdetails and summary make a disclosure widget with no JavaScript.
- 111Responsive Imagessrcset lets the browser choose the best image size and sizes tells it the display width.
- 112ARIA BasicsARIA attributes add accessibility information when HTML alone is not enough: aria-label na.
- 113Custom ElementsWeb components let you define your own tags.
- 114template, slot and Shadow DOMtemplate holds inert markup you can clone.
- 115Metadata and SEOThe head carries metadata: title, description, canonical link, viewport and Open Graph tag.
- 116Structured Data with JSON-LDJSON-LD in a script tag tells search engines facts about the page in a standard vocabulary.
- 117iframe and SandboxingAn iframe embeds another page.
- 118Canvas Animationcanvas draws pixels with JavaScript.
- 119SVG Paths and GradientsSVG scales without losing quality.
- 120Audio, Video and Captionsaudio and video play media without plugins.
- 121Global AttributesGlobal attributes work on every element: id, class, hidden, title, lang, tabindex, content.
HTML in practicePremium7 lessons
- 122HTML PerformanceFast pages load less and delay the rest.
- 123Accessibility ChecklistCheck headings are in order, images have alt, form fields have labels, colours have enough.
- 124HTML Email BasicsEmail clients are limited, so email HTML uses tables for layout, inline styles and simple .
- 125Print Friendly PagesA print stylesheet hides navigation and uses black text on white.
- 126Validating and Linting HTMLThe W3C validator finds invalid markup.
- 127A Complete Page TemplateA solid starting template has doctype, lang, charset, viewport, title, description, a styl.
- 128Project: Accessible Signup FormPut it together: labelled fields, validation, grouped options, hints and a clear submit bu.