Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

HTML vs HTML5: what changed, which tags are obsolete, and where XML fits

Tutorials still talk about HTML and HTML5 as if they were two languages. They are one language at different stages. Here is what HTML5 changed, what to stop using, and how XML differs.

Short answer: HTML5 is the version of HTML that followed HTML 4.01. It added a short <!DOCTYPE html>, semantic elements such as header, nav, main and article, native audio and video, canvas, new form input types and JavaScript APIs such as Web Storage, and it made presentational tags like font and center obsolete. Since 2019 the WHATWG HTML Living Standard is the single current version. XML is a separate, stricter markup language for data, with tags you define yourself.

HTML vs HTML5: the short answer

HTML5 is not a separate language from HTML. It is the name for the version of HTML that followed HTML 4.01 and XHTML 1.0, and it added semantic elements, native audio and video, the canvas element, new form controls and a set of JavaScript APIs. Today there is no numbered version at all: browsers follow the HTML Living Standard maintained by the WHATWG, and a page that starts with <!DOCTYPE html> is simply "HTML".

So when people compare HTML and HTML5, they usually mean old HTML 4.01 or XHTML 1.0 markup against the modern standard. This guide shows what changed, which old tags to stop using, and how HTML compares with XML.

A short history: from HTML 4.01 to the Living Standard

HTML 4.01 became a W3C Recommendation in 1999, and XHTML 1.0 rewrote it in XML syntax shortly afterwards. Browser makers then formed the WHATWG and began work on what became HTML5, which the W3C published as a Recommendation in October 2014. For several years the W3C and WHATWG maintained separate HTML documents. On 28 May 2019 the two bodies signed a memorandum of understanding to work on a single version, and the WHATWG HTML Living Standard is now the one that counts.

MDN describes "HTML5" today as largely a buzzword for a set of modern web technologies: the HTML Living Standard plus JavaScript APIs for storage, multimedia and hardware access. The word is still useful when you are reading old tutorials or job listings, but there is no "HTML6" coming. The standard is updated continuously.

HTML vs HTML5 at a glance

FeatureHTML 4.01 / XHTML 1.0HTML5 and the Living Standard
DoctypeLong, with a DTD reference<!DOCTYPE html>
Character encodingLong http-equiv meta tag<meta charset="utf-8">; documents must use UTF-8
Page structureGeneric <div> with class names<header>, <nav>, <main>, <article>, <section>, <aside>, <footer>
Audio and videoPlugins such as Flash through <object> or <embed>Native <audio> and <video>
DrawingImages or plugins<canvas> and inline <svg>
FormsText, password, checkbox, radio, fileAdds email, url, tel, number, range, date, color, search, plus required, placeholder and pattern
Error handlingEach browser guessed differentlyThe parsing algorithm is specified, so browsers handle broken markup the same way
Presentational tags<font>, <center> and others allowedObsolete; use CSS

The doctype

An HTML 4.01 Strict page had to start with a long declaration that pointed to a document type definition:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">

Modern HTML needs only this:

<!DOCTYPE html>

The WHATWG standard explains that the doctype is required for legacy reasons. When it is missing, browsers tend to use a different rendering mode, often called quirks mode, that is incompatible with some specifications. The short doctype is case-insensitive and switches every current browser into standards mode. A minimal valid page now looks like this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Example page</title>
</head>
<body>
  <main>
    <h1>Hello</h1>
  </main>
</body>
</html>

Semantic elements

Older pages were built from nested <div> tags with class names such as header or sidebar. Those names meant something to the developer and nothing to the browser. HTML5 added elements whose names carry meaning:

  • <header> and <footer> for introductory and closing content of a page or section.
  • <nav> for major blocks of navigation links.
  • <main> for the main content of the page, used once.
  • <article> for self-contained content such as a blog post or a product card.
  • <section> for a thematic group of content, normally with a heading.
  • <aside> for related content such as a sidebar.
  • <figure> and <figcaption> for an image, chart or code sample with a caption.
  • <time> for dates and times in a machine-readable form.

Screen readers use these elements to let people jump straight to the navigation or the main content, and search engines get a clearer picture of the page. They do not change how the page looks; you still style them with CSS.

Audio, video and canvas

Before HTML5, playing a video in a browser usually needed a plugin. Now the browser plays media itself:

<video controls width="640" poster="intro.jpg">
  <source src="intro.webm" type="video/webm">
  <source src="intro.mp4" type="video/mp4">
  Your browser cannot play this video.
</video>

The browser picks the first source it can play. <audio> works the same way for sound.

The <canvas> element gives JavaScript a drawing surface. MDN describes the Canvas API as a way to draw graphics with JavaScript, used for animation, game graphics, data visualisation and photo manipulation. For logos, icons and diagrams that must stay sharp at any size, inline <svg> is usually the better choice, because it is vector markup rather than pixels.

Forms got smarter

HTML5 added input types that bring the right keyboard on a phone and basic validation without JavaScript:

<form>
  <input type="email" name="email" required placeholder="you@example.com">
  <input type="tel" name="phone" pattern="[0-9]{10}">
  <input type="date" name="visit">
  <input type="number" name="qty" min="1" max="10">
  <button>Send</button>
</form>

On an Android or iPhone keyboard, type="tel" opens the number pad and type="email" adds the @ key. The required and pattern attributes stop obviously wrong input before it is sent. Browser checks are a convenience for the visitor, not security: always validate again on the server, because anyone can send a request that skips the form.

JavaScript APIs that came with HTML5

Much of what people call HTML5 is really a set of browser APIs defined alongside it. The ones you meet most often:

  • Web Storage: localStorage and sessionStorage keep small amounts of data in the browser.
  • History API: history.pushState() changes the URL without a full page load, which single-page apps rely on.
  • Drag and drop for moving elements and dropping files into the page.
  • Web Workers run JavaScript in a background thread so heavy work does not freeze the page.
  • Geolocation, WebSockets and offline features are often grouped under the HTML5 label too, although some are now separate specifications.

Obsolete tags: what to stop using

The WHATWG standard lists elements that are entirely obsolete and must not be used by authors. Browsers still display most of them so that old pages keep working, but validators flag them and they carry no meaning. Common ones and their replacements:

Obsolete elementUse instead
<font>, <center>, <big>, <basefont>CSS
<tt><code>, <kbd>, <samp> or <var>, depending on meaning
<strike><del> for an edit, otherwise <s>
<acronym><abbr>
<frame>, <frameset>, <noframes><iframe> and CSS, or server-side includes
<applet><embed> or <object>
<marquee>, <blink>CSS animation, used sparingly
<dir><ul>

If an old site still uses <font> and tables for layout, it will usually display, but it is harder to make mobile-friendly and accessible. Replacing them is a good first step before a redesign.

XML vs HTML

XML, the Extensible Markup Language, is a W3C Recommendation whose current edition is XML 1.0 Fifth Edition from 2008. It looks similar to HTML because both use tags in angle brackets, and both come from the same ancestor, SGML. Their purposes are different. HTML describes a document for people to read in a browser. XML describes data, and you invent the tag names yourself.

PointHTMLXML
PurposeStructure and display of web pagesStoring and exchanging data
TagsFixed set defined by the standardDefined by you or by a schema
CaseElement and attribute names are case-insensitiveCase-sensitive
Closing tagsSome can be left out, such as </p> and </li>Every element must be closed
ErrorsBrowsers recover from broken markup in a defined wayA well-formedness error is a fatal error the parser must report
Typical useWeb pages and email templatesSitemaps, RSS feeds, SOAP APIs, configuration and office file formats

The same data in both looks like this:

<!-- HTML: for people -->
<p>Plan: <strong>Starter</strong>, region Mumbai</p>

<!-- XML: for programs -->
<plan>
  <name>Starter</name>
  <region>Mumbai</region>
</plan>

You meet XML on almost every website even if you never write it: the sitemap.xml file you submit to search engines and RSS feeds are both XML. XHTML is the bridge between the two, HTML written in XML syntax, which is why old XHTML pages close every tag, including <br />.

Should you upgrade old HTML pages?

Use this quick checklist on an older site:

  • Replace the old doctype with <!DOCTYPE html> and add <meta charset="utf-8">.
  • Add a viewport meta tag so the page works on phones.
  • Swap layout tables and <font> tags for CSS.
  • Wrap the main areas in <header>, <nav>, <main> and <footer>.
  • Replace Flash or plugin media with <video> or <audio>.
  • Run the page through a validator and fix the errors it reports.

If the site is old enough to need all of this, it may be worth rebuilding it on WordPress or a modern framework instead. Our guide to building a website covers the options, and what is PHP explains the language most hosted sites run on. On Bigdomainhost's Web & cPanel hosting, WordPress installs from Softaculous in cPanel, so you can rebuild on it without a separate server.

Hosting HTML5 sites on Bigdomainhost

Any HTML page, old or new, runs on Web & cPanel hosting: upload the files through cPanel's File Manager and they are served by LiteSpeed from servers in Mumbai, with a free Let's Encrypt SSL certificate. For apps built with a JavaScript framework that need their own server process, a KVM VPS gives you full root access. If you would rather have someone build the site, web development is quoted in writing after a free scoping call.

Sources (checked )

How Bigdomainhost can help

Whether your pages are hand-written HTML5 or generated by WordPress, they need a quick home close to Indian visitors. Our Web & cPanel hosting serves them with LiteSpeed from servers in Mumbai, with the full cPanel, a free Let's Encrypt SSL certificate and free migration from your current host. If you would rather have the site built or rebuilt for you, our web development team quotes in writing after a free scoping call. Our engineers answer the phone in IST hours and WhatsApp at any time.

See cPanel hosting plans Ask an engineer on WhatsApp

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

What is the difference between HTML and HTML5?

HTML5 is the version of HTML that replaced HTML 4.01. It added semantic elements, native audio and video, canvas, new form input types and JavaScript APIs, and it made presentational tags such as font and center obsolete. Today both names point to the same HTML Living Standard.

Is HTML5 still used, or is there an HTML6?

Every modern page that starts with <!DOCTYPE html> uses current HTML, which grew out of HTML5. There is no HTML6 planned. The WHATWG maintains HTML as a living standard that is updated continuously instead of in numbered versions.

What is the HTML5 doctype?

It is <!DOCTYPE html>, placed on the first line of the page. It is not case-sensitive. Without it, browsers may fall back to quirks mode and render the page differently.

What is the difference between XML and HTML?

HTML describes web pages with a fixed set of tags and browsers recover from mistakes. XML describes data with tags you define, is case-sensitive, and every element must be closed; a well-formedness error is fatal. Sitemaps and RSS feeds are common XML files.

Which HTML tags are obsolete in HTML5?

The WHATWG standard lists font, center, big, tt, strike, acronym, applet, frame, frameset, marquee, blink and several others as obsolete. Browsers still display most of them, but you should use CSS or the modern replacement elements instead.

Do old HTML 4 websites still work?

Yes, browsers still display them, because the standard keeps backward compatibility. They may look poor on phones and be hard to use with screen readers, so updating the doctype, adding a viewport tag and replacing layout tables is worth doing.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.