Explore programmers.im
html.programmers.im

Home · Markup and tags

Elements, tags and a sample page

Markup and tags

The official WHATWG introduction includes a non-normative “quick introduction to HTML,” with a basic document, and a careful distinction between elements and tags. MDN, separately, describes how an element is set off by tags. The two wordings are quoted on their own. [source] [source]

A basic official sample

The official introduction says “A basic HTML document looks like this,” and then gives this sample. [source]

<!DOCTYPE html>
<html lang="en">
<head>
<title>Sample page</title>
</head>
<body>
<h1>Sample page</h1>
<p>This is a <a href="demo.html">simple</a> sample.</p>
<!-- this is a comment -->
</body>
</html>

It then says: “HTML documents consist of a tree of elements and text. Each element is denoted in the source by a start tag, such as “<body>”, and an end tag, such as “</body>”.” [source]

What MDN says about tags

MDN says: “An HTML element is set off from other text in a document by “tags”, which consist of the element name surrounded by < and >.” The name of an element inside a tag, it says, is case-insensitive, “However, the convention and recommended practice is to write tags in lowercase.” [source]

The first web server on display at the CERN visitor centre, with a label on the machine
Photographed by Sailko on 19 May 2014. The Commons file is titled “Ginevra, centro visitatori del cern, primo server della storia (1989).” The year 1989 is in the file title, as a description of the machine’s history; the photograph itself is from 2014 at the CERN visitor centre. The short file description is simply “Ginevra.” This photograph is CC BY 3.0. It is a visitor-centre display, not a 1989 working-day photograph. Photo: Sailko, 19 May 2014, CERN visitor centre · CC BY 3.0 · Wikimedia Commons
The NeXTcube first web server on display at the Science Museum in London, with a warning label on the cube
A NeXTcube used as the first web server, photographed by Geni in January 2015. The Commons file says it is on display at the Science Museum, London, and that the label reads “This machine is a server. DO NOT POWER IT DOWN!!” This photograph is CC BY-SA 4.0 and is used on the website only. The photograph’s location is London, not CERN, and it is a museum exhibit, not a working-day record. Photo: Geni, January 2015, Science Museum, London · CC BY-SA 4.0 · Wikimedia Commons
Keep the lights on

Enjoyed the markup?

No pop-ups. No intrusive advertising. Just interesting stuff. A little support helps the next programmers site get built.