Documentation
HTML, CSS, JavaScript, TypeScript and Python reference
Tags, properties, methods and functions explained in plain English, with examples that run live. 581 entries in one place.
- 68 tagsHTMLTags, attributes and page structureEvery HTML tag with its description, attributes and examples you see right away in a live preview. From document structure to forms, tables and media.Document structureSections and semanticsText and formattingListsBrowse HTML
- 30 selectors Β· 95 propertiesCSSSelectors, properties and live examplesCSS selectors, pseudo-classes and properties, with every value shown in a live example. The box model, Flexbox, Grid, typography, transitions and animations.SelectorsPseudo-classesPseudo-elementsBox modelBrowse CSS
- 211 entriesJavaScriptSyntax, methods and browser APIsLanguage syntax, classes, methods of arrays, strings and objects, promises, the DOM and browser APIs. You run every example with one click and see the new result in the console after you edit it.Syntax and statementsArraysStringsObjects and classesBrowse JavaScript
- 58 entriesTypeScriptTypes, generics and utility typesBasic types, interfaces, unions, generics and every utility type. Each example shows the type the compiler infers.Basic typesInterfaces and classesUnions and narrowingGenerics and advanced typesBrowse TypeScript
- 119 entriesPythonSyntax, built-in functions and methodsKeywords, built-in functions, string, list and dictionary methods, classes and objects, and the most used standard modules. Every example has a verified output and runs right in your browser.Syntax and keywordsBuilt-in functionsString methodsLists and tuplesBrowse Python
- How to use it
Live examples
Change the code of any HTML, CSS, JavaScript or Python example and see the result right away in the preview or the console.
Explained like a human
Every entry explains what it is for, when to use it and what to watch out for. No jargon.
Straight to practice
Every technology has a CodeWorlds course with free lessons, exercises and a code editor.
Most looked up
Comparisons: which one to use
- <div> vs <span>
- <section> vs <article> vs <div>
- <strong> vs <b>
- <em> vs <i>
- class vs id
- <button> vs <a>
- <header> vs <head>
- Flexbox vs Grid
- margin vs padding
- display vs visibility vs opacity
- transition vs animation
- :nth-child() vs :nth-of-type()
- border vs outline
- :focus vs :focus-visible
- map() vs forEach()
- let vs const vs var
- for...in vs for...of
- slice() vs splice()
- find() vs filter()
- () => {} vs function
- localStorage vs sessionStorage
- innerHTML vs textContent
- querySelector() vs getElementById()
- Promise.all() vs Promise.allSettled()
- async/await vs then()
- setTimeout() vs setInterval()
- interface vs type
- any vs unknown
- enum vs union
- Pick vs Omit
- as vs satisfies
- extends vs implements
- void vs never
- list vs tuple
- append() vs extend()
- sort() vs sorted()
- @staticmethod vs @classmethod
- namedtuple vs dataclass
- os vs pathlib
- lambda vs def
- map() vs list comprehension