HTML
May 2026
HTML (Hyper Text Markup Language) is a language to describe human-readable documents on the internet.
Hypertext is text containing hyperlinks to documents or other parts of documents. Links can refer to either local or remote targets.
What is a markup language
A markup language is used to define the logical structure of a document, how it should be displayed and instructions for programs that process it.
The name originates from the publishing industry, there are many markup languages.
The structure of HTML
A HTML is a tree which consists of elements, each element contains content which may include text and other nested elements.
Elements may contain attributes and point to other resources such as images, scripts, etc
Tags
Elements are defined by tags
Attributes
Attributes are a collection of key-value pairs.
Head
The head element contains document metadata, it is the first part of the document parsed by the browser
- A document’s title is defined by the title element
- Meta elements contain other items of metadata
- Link elements define relationships with other elements
- Style elements contain CSS styles
- Script elements contain Javascript code
Body elements
Block level
Block level elements are content that should be rendered separately from other elements such as headings and paragraphs
Inline Level
Inline level elements define elements that should flow together, such as hyperlinks and images
Escape Characters
<'- less than -<>- greater than ->&- ampersand -&'- apostrophe/single quote -'"- double quote -" - non-breaking space
Useful Inline Elements
bmakes text boldiidiomatic text (italics)ememphasis (also typically italics)strongmore boldeningqshort quotationcodeduhspanlogical unit of content
Hyperlinks
Self-explanatory, note that target can be set to _self or _blank or other targets
The URL can point to anything, absolute URLs include the full location including the protocl, host and path wheras relative URLs only include the path and are interpreted with relative to the location of the current document
Tables
- thead
- tbody
- tr
- th
- td
- tfoot
- caption
Comments
<!-- -->