Top Banner
More on HTML5 Darren Wood @darren | http://dontcom.com
32

More On Html 5

May 09, 2015

Download

Technology

Darren Wood

A brief outline on some of the new elements available in HTML 5 and how to start using them now.
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: More On Html 5

More on HTML5Darren Wood

@darren | http://dontcom.com

Page 2: More On Html 5

What is HTML 5?

‐nextmajorrevisionofHTML‐from1997to2006workonHTMLwithintheW3CwasfocusedexclusivelyonXHTML‐in2004withtheWebHypertextApplicaJonTechnologyWorkingGroup(WHATWG)formedasabreak‐awayfromtheW3C‐developedthecruxofHTML‐maindudeisIANHICKSON‐firstdraUappeared22Jan2008W3C‐twovariantsofsamelanguage;classicHTML(HTML5)orXHTMLvariant(XHTML5).firstJmeHTMLandXHTMLhavebeendevelopedinparallel‐HTMLisagamechangerespinthewebappandRIAareas...

Page 3: More On Html 5

HTML5 Design Principles

Page 4: More On Html 5

Support existing content

Ensure interoperability

Handle errors

Evolution not revolution

- Support existing content- Ensure interoperability- Precisely define UA behavior- Handle errors- Evolution not revolution

Page 5: More On Html 5

The problem with the current setup...

current setup is XHTML/XML

Page 6: More On Html 5

"The attempt to get the world to switch to XML, including quotes

around attribute values and slashes in empty tags and namespaces all

at once didn't work"

- TBL

Page 7: More On Html 5

“Authors will write invalid content regardless of what we spec. So the spec states what authors must not

do, and then tells implementers what they must do when an author

does it anyway”

- Ian Hickson

Page 8: More On Html 5

More than 90% of Alexa Top 500 sites

are not valid

Page 9: More On Html 5

The solution...

Page 10: More On Html 5

Don't get hung up on the syntax

Page 11: More On Html 5

<AHREF=contact.htmlclass=”yes”>

<inputTYPE=”button”value=FOO>

Page 12: More On Html 5
Page 13: More On Html 5
Page 14: More On Html 5

<!DOCTYPEhtml>

<htmlxmlns="http://www.w3.org/1999/xhtml">

HTML

XHTML

- html 5 simple doctype- xhtml 5 strict xml rules, must be application/xml or application/xhtml+xml, no doctype required

Page 15: More On Html 5

<!DOCTYPEhtml><htmllang="en"><head><metacharset=utf‐8><title>HTML5Demo</title></head><body><header><h1>Logoetc</h1></header><nav><p>Menu</p></nav><section><h1>Section</h1><article><p>article1</p></article></section><aside><h2>Someextracontent</h2></aside><footer><p>Copyright&copy;2009.</p></footer></body></html>

Page 16: More On Html 5

In the real world...

Page 17: More On Html 5

Semantic class names

Page 18: More On Html 5

HTML5 shiv

Page 19: More On Html 5

<style>figure{border:1pxinset#AAA;padding:4px;}</style><script>document.createElement("figure");</script>

Page 20: More On Html 5

tinyurl.com/html5-scaffold

Page 21: More On Html 5

Audio & Video

Page 22: More On Html 5

<videowidth="640"height="360"src="http://www.youtube.com/demo/google_main.mp"autobuffercontrolsposter="whale.png"><p>TrythispageinSafari4!Oryoucan<ahref="http://www.youtube.com/demo/google_main.mp4">downloadthevideo</a>instead.</p></video>

Page 23: More On Html 5

Codec Shit-fight.

Page 24: More On Html 5

OGG Theora & H.264

the plan was to support OGG Theora & H.264

Page 25: More On Html 5

OGG Theora & H.264

the plan was to support OGG Theora & H.264

Page 26: More On Html 5

The deal with OGG

open source and free licensingBig Boys (Apple, Google) are generally scared of OS stuffno widespread hardware support (means mobile is out)lack of quality compared to H.264 ??

Page 27: More On Html 5

The deal with H.264

patent owned by MPEG (Motion Picture Experts Group)OS companies (Mozilla) reckon it's too priceypaying the licence doesn't guarantee complete immunity from patent infringement in the future...a whole bunch of other major licensing issues. LEGAL JARGAN

Page 28: More On Html 5

Just use Flash<cry>

Page 29: More On Html 5

Just use Flash<cry>

Page 31: More On Html 5

http://assets.dontcom.com/html5.pdf

download

Page 32: More On Html 5

Lets talk!

questions yo