Turning Learners Into Developers
Codekilla
CODEKILLA
back to course
Lesson 03 / 1003%· free preview
Introduction3/7

HTML History & Versions

From HTML 1.0 in 1991 to modern HTML5 — meet the milestones every web dev should know.

Definition

HTML wasn't born in its modern form. It evolved across three decades, shaped by browser wars, the W3C standardisation push, and the rise of mobile.

YearVersionWhat changed
1991HTML 1.0Tim Berners-Lee's first spec — 18 tags, no images.
1995HTML 2.0Forms, file uploads — first IETF standard.
1997HTML 3.2Tables, scripts, applets — W3C's first version.
1999HTML 4.01Strict / Transitional flavours; CSS encouraged.
2000XHTML 1.0XML-strict syntax — every tag closed, lowercase.
2014HTML5Semantic tags, <video>, <canvas>, <form> upgrades, no DTD soup.
TodayLiving StandardMaintained by WHATWG — versionless, evergreen browsers ship it.

Modern rule of thumb: just use HTML5. The "Living Standard" auto-updates so you never need to declare a version beyond <!DOCTYPE html>.

Hello World — End to End

Step 1. Save this as version.html:

html
<!DOCTYPE html>            <!-- HTML5 — five-character doctype -->
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>HTML Version Demo</title>
  </head>
  <body>
    <h1>Hello, HTML5!</h1>
    <p>This page uses the modern doctype.</p>
  </body>
</html>

Step 2. Open in any browser. The 5-character doctype tells the engine to render in standards mode.

Output: Big "Hello, HTML5!" heading + paragraph below.

Why HTML5 Won
  • Semantic tags<header>, <nav>, <main>, <footer> replace soup of <div class="header">.
  • Native multimedia<audio> and <video> killed the Flash plugin era.
  • Smarter formstype="email", type="date", built-in validation.
  • APIs galore<canvas>, localStorage, Geolocation, drag-and-drop.
Common Mistakes
  • Copy-pasting an old HTML 4.01 doctype<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...">. Modern code uses the 5-char <!DOCTYPE html>.
  • Mixing XHTML strict syntax unnecessarily — HTML5 is forgiving (self-closing <br> works without <br />).
  • Versioning — you don't write <!DOCTYPE html5>. The 5 is implied.
Interview Questions

Practice Exercises
  1. Doctype sniff — Open three websites and view source (Ctrl+U). Spot the doctype. Hint: line 1.
  2. Time travel — Save a page with <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">. Compare rendering vs <!DOCTYPE html>. Hint: quirks vs standards.
  3. Living history — Visit whatwg.org and bookmark the HTML Living Standard. Hint: that's the canonical spec.

💡 Think Like a Programmer: Specs evolve, but <!DOCTYPE html> has been future-proof since 2014. When in doubt, type those 15 characters and move on.

AI-powered recap

Quick recap quiz?

We'll generate 5 MCQs from this lesson and check your understanding instantly. Takes ~30 seconds.

Ready to move on?
// example library
Want more hands-on snippets in HTML5?
Browse 1 runnable example · across 1 chapter · short, copy-paste-friendly · grouped by topic
Explore examples
// side-by-side reference
See this in other languages
Compare the same concept across C, C++, Java, and Python — one table, zero tab-switching.
Compare Languages
// feedback.matters()
Did this lesson help you?