HTML
| Technology | |
|---|---|
![]() Image placeholderPlace the file shown below in the assets/articles folder html.webp | |
| Full name | HyperText Markup Language |
| Purpose | Structure and semantics of web documents |
| Maintained by | WHATWG (Living Standard) |
| Main consumers | Web browsers and related tools |
| Common companions | CSS and JavaScript |
HTML (HyperText Markup Language) is the standard markup language used to structure documents on the web. It describes the meaning and organisation of content through elements such as headings, paragraphs, links, images, lists, forms and tables. Browsers parse HTML into a document tree that scripts and rendering engines can work with. HTML is not a programming language: it describes document structure rather than general-purpose algorithms.[1]
Elements, attributes and the document tree
An HTML element is usually represented by a start tag, content and an end tag. Some elements, such as img and meta, are void elements and do not wrap content. Attributes provide additional information, such as a link destination, image source or form behaviour. The browser parses the document into a Document Object Model (DOM), a tree of nodes that represents the page structure.
The standard document structure includes a doctype declaration, an html root element, a head for metadata and linked resources, and a body containing the page's visible content. Metadata such as the page title, character encoding, viewport settings and description helps browsers and other services interpret the document. A well-structured page should declare its language and use a meaningful title.
Semantic HTML
Semantic elements communicate the purpose of content. A header represents introductory content, nav identifies navigation, main marks the primary content, article represents a self-contained composition and footer contains closing information. Headings create a hierarchy, while buttons and links have distinct meanings: a button performs an action, and a link navigates to a resource.
Using the correct element improves accessibility and often reduces custom code. Screen readers can use landmarks and headings to help users navigate a page. Keyboard users benefit from native controls that already support focus and activation. A clickable div may look like a button, but it does not automatically provide the keyboard behaviour or semantics of a real button element.
Forms, media and tables
HTML forms collect user input through controls such as text fields, checkboxes, radio buttons and selects. Labels should be associated with their controls, and required input should be communicated clearly. Browser validation can catch simple errors, but servers must validate submitted data independently because client-side checks can be bypassed.
Images need alternative text that communicates their purpose. Decorative images should generally use empty alternative text, while informative images need concise descriptions. Tables are intended for tabular data rather than visual page layout; header cells and appropriate associations make complex tables easier to understand. Video and audio elements provide native media controls, but captions and transcripts are important for accessibility.
HTML, CSS and JavaScript
HTML defines structure and meaning. CSS controls presentation, including typography, spacing, colours and responsive layout. JavaScript adds behaviour, such as responding to user actions or loading information from a server. These layers are often used together, but separating their responsibilities makes projects easier to maintain. A page should remain understandable as a document even when styles or scripts fail to load.
Standards and browser interoperability
HTML is maintained as a living standard by the WHATWG. Browser vendors implement the specification and test their behaviour against shared test suites. Web developers should prefer standard elements and features over browser-specific workarounds, test important pages in multiple browsers and avoid assuming that one implementation's quirks are universal. The broader web platform also depends on text encoding, HTTP transport and the original hyperlink model associated with Tim Berners-Lee.
Further engineering considerations
Document quality, accessibility and maintainability
Good HTML describes the meaning and structure of content before visual styling is considered. A page should have a clear heading hierarchy, meaningful link text, labels associated with form controls and alternative text for informative images. These details help screen-reader users, keyboard users, search systems and automated tools interpret a document. Native elements are generally preferable to recreating buttons, links or disclosure controls with generic containers because browsers already provide expected keyboard and accessibility behaviour.
Validation and review are useful because browsers are designed to recover from imperfect markup, which can hide structural mistakes. A page that appears correct in one browser may still contain invalid nesting, duplicated identifiers or controls that are difficult to operate. Teams can use validators, accessibility audits and automated tests as part of their development process, while still checking pages manually. Semantic markup also gives a project a stable foundation: CSS can change the presentation and JavaScript can add interaction without making the underlying content difficult to understand.
See also
- CSS – The style sheet language that controls the presentation, layout and responsive behaviour of HTML documents.
- JavaScript – The programming language that powers interactive web pages and a large ecosystem of browser, server and desktop software.
- Tim Berners-Lee – British computer scientist who invented the World Wide Web.
- HTTP/3 – The third major version of the Hypertext Transfer Protocol, which runs over QUIC instead of TCP.
- JSON – A lightweight text format for structured data based on JavaScript object syntax.
- React – A JavaScript library for building user interfaces from composable components.
- UTF-8 – A variable-width character encoding that represents every Unicode code point using one to four bytes.
- WebAssembly – A portable binary instruction format that runs at near-native speed in browsers and other runtimes.
References
- ↑ WHATWG HTML Living Standard (html.spec.whatwg.org)
- ↑ MDN HTML: HyperText Markup Language (developer.mozilla.org)
- ↑ W3C Web Accessibility Initiative (w3.org)
