New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

HTML5 vs. HTML4

From: HTML5 First Look

Video: HTML5 vs. HTML4

One of the best ways to approach HTML5 is by first comparing it to HTML 4 and then learning the differences. Although HTML5 does represent an ambitious step forward in the evolution of HTML, it's largely a revised version of HTML 4. Meaning that, if you are comfortable writing HTML 4, you should find yourself quite comfortable with the majority of the HTML5 specification. In this movie, I want to point out some of the major differences from HTML 4 to HTML5. Now first, it's important to note that the HTML5 specification is designed not just to replace HTML 4, but also the XHTML 1.0 and DOM Level 2 specification.

HTML5 vs. HTML4

One of the best ways to approach HTML5 is by first comparing it to HTML 4 and then learning the differences. Although HTML5 does represent an ambitious step forward in the evolution of HTML, it's largely a revised version of HTML 4. Meaning that, if you are comfortable writing HTML 4, you should find yourself quite comfortable with the majority of the HTML5 specification. In this movie, I want to point out some of the major differences from HTML 4 to HTML5. Now first, it's important to note that the HTML5 specification is designed not just to replace HTML 4, but also the XHTML 1.0 and DOM Level 2 specification.

It also contains detailed parsing rules that are designed to improve the interoperability of systems that use HTML documents. As such, the HTML5 Specification is much larger than HTML 4 and covers a lot more ground. Now one of the first places you'll notice the difference in writing HTML5 documents is the doctype and character encoding. Here we have some HTML 4 doctypes. You can see how many of them they are and how long and complicated they are. Well, rather than having to deal with multiple doctypes, you just use a single simple doctype that declares a document as an HTML file.

Look at how simple that is! Now since HTML is no longer HTML based, no document type definition is actually required at all. Now character encoding is likewise simplified. All that's required now is a meta tag with a charset attribute. HTML5 also introduces some new elements that assist with page structure, embedded content, and new phrasing tags that help add additional meaning to content within the page. Several new attributes have been added to existing elements as well to extend their power and functionality.

Forms undergo a dramatic update in HTML5. Much of the work done on the Web Forms 2.0 specification has been added to the HTML5 spec and the result is new form controls and input types that allow you to create more powerful forms and more compelling user experiences. New form elements include date pickers, color pickers, and numeric steppers. The input element has been considerably beefed up with new input types such as url, email, and search that will make it easier to control the presentation and the behavior of form content.

Now it's worth noting that HTML5 also add support for the PUT and DELETE form methods, making it easier to submit data to a wider array of applications. Now by far, the addition to HTML5 that's getting the most attention is the introduction of several new integrated APIs or Application Programming Interfaces that are designed to make developing web applications easier across multiple devices and user agents. These APIs include the much talked about video and audio API. An API for building offline applications, one for editing page content, and one that controls drag-and-drop functionality, another that focuses on history, and finally one that controls application protocols and media types.

Now, other APIs like Geolocation and web messaging are associated with HTML5 but are actually defined in their own specifications. So those are a few of the highlights of the differences between HTML5 and HTML 4. In our next series of movies, we'll focus on some of those differences in greater detail starting with the new structural tags in our next movie.

Show transcript

This video is part of

Image for HTML5 First Look
HTML5 First Look

50 video lessons · 73207 viewers

James Williamson
Author

 
Expand all | Collapse all
  1. 3m 56s
    1. Welcome
      1m 1s
    2. Using the exercise files
      1m 50s
    3. Who is this course for?
      1m 5s
  2. 21m 12s
    1. Exploring prior standards
      4m 26s
    2. Why do we need HTML5?
      3m 32s
    3. HTML5 timeline
      4m 24s
    4. Current HTML5 support
      4m 25s
    5. What HTML5 is (and what it isn't)
      4m 25s
  3. 27m 49s
    1. HTML5 vs. HTML4
      3m 25s
    2. New structural tags
      6m 1s
    3. New content tags
      4m 7s
    4. New application-focused tags
      5m 32s
    5. Deprecated elements
      4m 28s
    6. API overview
      4m 16s
  4. 22m 29s
    1. Content models
      5m 33s
    2. Understanding the outline algorithm
      3m 21s
    3. The role of ‹div› tags
      4m 20s
    4. Using ID and class attributes
      2m 6s
    5. DOCTYPE declarations
      4m 16s
    6. Character encoding
      2m 53s
  5. 41m 27s
    1. Basic page structure
      3m 40s
    2. Structuring top-level elements
      7m 30s
    3. Structuring interior content
      8m 42s
    4. Building headers
      9m 11s
    5. Checking document outlines
      5m 46s
    6. Ensuring cross-browser structure
      6m 38s
  6. 27m 53s
    1. New input types
      5m 57s
    2. Setting form autofocus
      2m 53s
    3. Using placeholder data
      4m 4s
    4. Marking required fields
      3m 24s
    5. Working with number inputs
      5m 49s
    6. Using date pickers
      5m 46s
  7. 1h 1m
    1. Canvas overview
      6m 21s
    2. Adding canvas content
      8m 58s
    3. Drawing in the canvas environment
      12m 9s
    4. Drag-and-drop API overview
      6m 18s
    5. Offline applications overview
      7m 11s
    6. Video overview
      5m 45s
    7. Encoding video
      8m 23s
    8. Adding video
      5m 58s
  8. 57m 33s
    1. Geolocation API overview
      5m 50s
    2. Web storage API overview
      5m 40s
    3. WebSockets overview
      4m 16s
    4. CSS3 overview
      6m 38s
    5. Enhancing typography with CSS3
      7m 42s
    6. Using @font-face
      7m 11s
    7. Styling HTML5 with CSS3
      10m 23s
    8. Using CSS3 transitions
      9m 53s
  9. 5m 6s
    1. Final thoughts
      3m 49s
    2. Goodbye
      1m 17s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.