Top Banner
Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author
20

Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Transitioning to HTML5 and CSS3

Patrick Carey, Cengage Learning Author

Page 2: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Innovations

Browsers

Languages

200820071997 1998 1999 2000 2001 2002 2003 2004 2005 20092006

HTML 3.2W3C Rec.

HTML 4.0W3C Rec.

HTML 3.2W3C Rec.

HTML 4.0W3C Rec.

HTML 4.01W3C Rec.

HTML 4.01W3C Rec. HTML 5

Draft HTML 5Draft

HTML 5working group

HTML 5working group

XHTML 1.0W3C Rec.

XHTML 1.0W3C Rec.

XHTML 1.1W3C Rec.

XHTML 1.1W3C Rec.

XHTML 2Draft

XHTML 2Draft

IE 4IE 4 IE 5IE 5 IE 6IE 6 IE 7IE 7 IE 8IE 8

NS 4 NS 4 NS 4.7 NS 4.7 NS 6 NS 6 NS 7 NS 7

FF 1 FF 1 FF 2 FF 2 FF 3 FF 3

Facebook Facebook podcastingpodcasting

youtubeyoutube

iTunes iTunes

CSS 2.0W3C Rec.CSS 2.0

W3C Rec.CSS 3.0

Draft CSS 3.0

Draft

MySpaceMySpace

AJAX AJAX

SAF 1SAF 1 SAF 2SAF 2 SAF 3SAF 3 SAF 4SAF 4

twitter twitter

blogging blogging

RSS RSS Web CommerceWeb Commerce

Web ConferencingWeb Conferencing

2010 2011

iPhoneiPhoneiPadiPad

IE 9IE 9

FF 3.5 FF 3.5 FF 4 FF 4

SAF 5SAF 5

GC 1GC 1 GC 3GC 3 GC 8GC 8 GC 10GC 10

XHTML 2Halted

XHTML 2Halted

HTML 5Can. Rec. (2012)

HTML 5Can. Rec. (2012)

Page 3: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

HTML5 Differences from HTML4 New structural elements Web forms Support for audio and video Modified existing HTML4 elements and attributes Removal of outdated HTML4 elements and attributes New APIs for Web applications Extensions to the DOM

Page 4: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

New HTML4 Structural Elements Header and footers

o hgroupo headero footer

Content elementso sectiono articleo aside

Navigationo nav

Figureso figureo figcaption

Page 5: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

HTML4 DIV-itis

<div id="header">

<div id="footer">

<div id="mainContent"><div id="links"> <divid="article">

<div class="sidebar">

Page 6: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

HTML5 Structural Elements

<header> … </header>

<footer> … </footer>

<section> … </section><nav> … </nav> <article> …</article>

<aside> … </aside>

Page 7: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Elements Absent in HTML5 Presentational Elements

o basefont, big, center, font, strike, tt, u Frames

o frame, frameset, noframes Redundant Elements

o acronym (use abbr)o applet (use object)o dir (use ul)o isindex (use form controls)

Page 8: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Attributes Absent in HTML5 Presentational Attributes

o align, background, bgcolor, hspace, vspace Table Attributes

o border, char, cellpadding, cellspacing, nowrap, valign, width Hypertext Attributes

o alink, link, text Frame Attributes

o frameborder, scrolling, marginheight, marginwidth

Page 9: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

New HTML5 APIs API for playing audio and video API to enable offline Web applications API for creating editable content Drag & Drop API Canvas API Web Messaging API

Page 10: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

HTML Enhancements to the DOM getElementsByClassName() innerHTML to parse or serialize an HTML or XML document activeElement to determine which element currently has the

focus

Page 11: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

New HTML5 Web Forms New input types

o type="tel" (phone numbers)o type="search" (search boxes)o type="url"o type="email"o type="number" (spin boxes)o type="range" (slider)o type="color" (color picker)o type="date" (calendar picker)

placeholder attribute form attribute to associate fields with forms

Page 12: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Form Validation Attributes to constrain input:

o autocompleteo min, max, stepo multipleo pattern o required

form validation is on by default (turn off using novalidate attribute)

Page 13: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Audio in HTML5 New audio element for embedded audio

o src, preload, autoplay, loop, and control attributeso Scriptable

Codecs Natively Supported by Major Browsers

Browser WAV Ogg Vorbis MP3

IE

Firefox

Safari

Chrome

Opera

Page 14: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Video in HTML5 New video element for embedded video

o src, poster, preload, autoplay, loop, control attributes

o Scriptable Codecs Natively Supported by Major Browsers

Browser WebM Ogg Theora MPEG-4 H.264

IE

Firefox

Safari

Chrome

Opera

Page 15: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

New with CSS3 Expanded selectors Opacity filters HSL color model Rounded and elongated corners Background image styles Drop shadows Media queries Transitions and Animations Multi-column layouts

Page 16: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Supporting HTML5 and CSS3 Many features can and should be used today Employ progressive enhancement to deliver the best user

experience Make sure that Web pages degrade gracefully Don't ask for perfect repeatability

Page 17: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Example 1: HTML5 and CSS3

Page 18: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Example 2: Web Forms

Page 19: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Example 3: Audio and Video

Page 20: Transitioning to HTML5 and CSS3 Patrick Carey, Cengage Learning Author.

Contact Information

Patrick CareyCarey Associates8502 Miller RoadVerona, WI 53593(608) [email protected]