What is difference between HTML and HTML5

Dani AI

Generated

Most answers in this thread hit the right points (semantic elements, media, the simpler doctype). Credit to and for calling out the new APIs and to for noting the streamlined doctype. A key correction: HTML has always allowed client-side scripting (the script element existed long before HTML5). What HTML5 did was standardize many new HTML elements and JavaScript-facing APIs so web pages could do more without plugins — not “invent” client-side scripting.

Standards note and naming: the W3C published HTML5 as a Recommendation (a snapshot) in 2014, but the modern HTML work is maintained as a continuously updated “living standard” by WHATWG; “HTML5” is often used loosely to mean the modern HTML platform (markup + new APIs). (w3.org)

Practical guidance for adopting the modern HTML platform: always use the simple HTML doctype to get standards mode; favor semantic elements for accessibility and SEO; use progressive enhancement and feature detection (polyfills only where needed) rather than browser sniffing; avoid deprecated features (for example AppCache) and use Service Workers + the Cache API for offline behavior. When supporting older browsers, use feature detection libraries and targeted polyfills rather than blocking modern APIs. (developer.mozilla.org)

Quick checklist: start new projects with the modern doctype, validate and lint your HTML, use semantic markup + ARIA where appropriate, detect features at runtime and provide clean fallbacks, and consult the WHATWG spec and MDN for up‑to‑date, browser-specific compatibility notes.

Recommended Answers

All 10 Replies

Well, Html 5 is the updated version of HTML. It is the same as HTML much gives facility for audio and video tag. HTML 5 comes with some extra tags that HTML doesn't have. HTML5 also have JS GeoLocation API assits in recognize places.

Html 5 has a universal declaration<!doctype html> you don't need to write all that lines with trasitional strict etc

You may be interested in this posting from the W3C which covers the differences between HTML and HTML5. Topics covered...encoding changes, doctype declaration, obsolete elements, new elements, attribute changes, etc.

http://www.w3.org/TR/html5-diff/

HTML is a vocabulary: it defines what kinds of elements you can write (e.g. BODY, P, LI, etc.) but isn't very strict about how you write it .

HTML5 is the next-generation version of HTML (the current version of HTML 4)not a standard yet, partially supported by some browsers (not supporting ie6&ie7) . in html5 you can use the canvas to do animation and shapes and the semantic is great because you can use new tags like : <head>,<article>,<footer> etc.

html 5 is a great advancement in the html spec.If you want to develop a web appllication, a website that goes beyond presentation use it.Has great support for css 3.Also customised for developing on mobile devices in conjunction with css 3 and javascript- web apps for the iphone etc.Supported by almost all major browsers and all the big guys(facebook,google etc) are using it.Bottomline you have to know it.Switch Now pedro!!kidding.....

If you are considering deploying a new website, you should start to use the HTML5 Doctype. This doesnt meant that you have to include new HTML5 elements that some browsers do not support yet. As newer browser versions appear, more support for HTML5 elements will be available.

HTML5 is an extended version of HTML which is an added advantage to web developers. In HTML5 there are some new exciting features which are listed below:

  • Extra added HTML elements that improve our ability to describe content
  • Advanced web forms handling
  • APIs for easier web application development
  • <canvas> element used for image scripting on the fly
  • Users are able to edit and interact with sections of a web page

HTML 5 is the advanced verision version of HTML i.e it is the 5th verision of HTML standard. Html 5 differs from HTML in its structure.
Other additional functionalities provided by HTML 5 are:
-Context Menus
-Async attribute
-<details> tag
-<datagrid> tag
-<menu> tag
-<command> tag

HTML 5 has more advanced features than old HTML..

1.HTML5 supports both audio and video whereas none of these was a part of HTML.
2.HTML does not allow JavaScript to run within the web browser whereas HTML5 provides full support for JavaScript to run in the background.
3.In HTML5, inline MathML and SVG can be used in text whereas this wasn’t possible in HTML.
4.HTML5 supports new kinds of form controls, for example: dates and times, email, number, range, tel, url, search etc.
5.There are many new elements introduced in HTML5. Some of the most important ones are: summary, time, audio, details, embed, figcaption, figure, footer, header, article, canvas, nav, output, section, source, track, video, etc..
and many more differences you can google it!

commented: As a developer, is it OK to be 7 years late? -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.