HTML Introduction
First appeared on mobifreaks.com · Updated
This was the first tutorial in an HTML series I started on Mobifreaks in 2011. I have refreshed the code and the history, since a lot has happened since "HTML5 is under development".
What is HTML?
HTML (HyperText Markup Language) is the markup language used to create web pages. Every page you visit is built on it. You can see any page's HTML by right-clicking it and choosing View Page Source.
Most people think building a website is hard. It isn't: a few tags are enough to get a page on screen.
Basic structure
This is the smallest complete page I would write today:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Web page title</title>
</head>
<body>
<h1>Content heading</h1>
<p>Web page content goes in the body.</p>
</body>
</html>
<!doctype html>tells the browser to use standards mode.lang="en"tells screen readers and translation tools which language the page is in.<meta charset="utf-8">makes sure characters like é or ₹ display correctly.- The viewport line makes the page fit phone screens.
<head>holds information about the page.<body>holds what people see.
My 2011 version skipped the first four, and older browsers forgave it. They still do, but you lose standards mode, correct characters and a good mobile layout.
A short history
Tim Berners-Lee created HTML at CERN; it was first described publicly in 1991. Early work happened at CERN and then the IETF, and after the W3C was founded in 1994, HTML's development moved there.
- 1993: HTML+ proposed.
- 1995: HTML 2.0, the first standard version. HTML 3.0 was proposed the same year but abandoned.
- 1997: HTML 3.2.
- 1999: HTML 4.01.
- 2014: HTML5 became a W3C Recommendation. In 2011 it was still "under development".
- 2019 onward: the W3C and WHATWG agreed on a single HTML Living Standard, maintained by the WHATWG. There are no more version numbers; the spec is updated continuously.
Why it took off
A big part of HTML's early success was the Mosaic browser, which made the web graphical and easy to use. Mosaic is long gone, but its line lives on: many of its developers went on to build Netscape Navigator, and Netscape's code became the start of Mozilla and Firefox.