html5 & the today of the web
Post on 04-Apr-2018
217 Views
Preview:
TRANSCRIPT
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 1/71
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 2/71
Hello. We are John
and Nathan. Here isa bit of background
about each of us...
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 3/71
Master of Divinity
Asbury Theological Seminary
John Dyer
Nathan Smith
Master of Theology
Dallas Theological Seminary
+=
= +Desktop OS = Windows
Desktop OS = Mac
Mobile = iOS
Mobile = Android
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 4/71
What we have in common: Weare both web developers who
want to see the “Big-C” churchbetter utilize web technologies.
We also both♥ JavaScript :)
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 5/71
So, what is HTML5? It is thenewest version of HTML. But
also a phrase for everythingcool + new on the web. Not
all that’s labeled HTML5 *is*HTML5. But that’s okay...
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 6/71
New Hotness!HTML5 + CSS3 + JavaScript
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 7/71http://www.apple.com/html5/
Apple likes HTML5
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 8/71http://www.html5rocks.com/
Google likes HTML5
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 9/71
Mozilla (Firefox) likes HTML5
https://developer.mozilla.org/en/HTML/HTML5
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 10/71
Opera likes HTML5
http://www.opera.com/docs/specs/presto25/html5/
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 11/71http://ie.microsoft.com/testdrive/
Last (but not least) – Microsoft likes HTML5
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 12/71
HTML5is terse
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 13/71
HTML5 <!DOCTYPE html>
XHTML 1.0 Transitional <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML1.0 Transitional//EN" "http://www.w3.org/
TR/xhtml1/DTD/xhtml1-transitional.dtd">
Simplified doctype declaration
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 14/71
HTML5 <script>
// Code here. </script>
XHTML 1.0 Transitional <script type="text/javascript">
/* <![CDATA[ */
// Code here./* ]]> */ </script>
Simplified JavaScript embedding
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 15/71
HTML5 <style>
// Code here. </style>
XHTML 1.0 Transitional <style type="text/css">
// Code here. </style>
Simplified embedded styles
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 16/71
HTML5 <link rel="stylesheet" href="file.css" />
XHTML 1.0 Transitional <link rel="stylesheet" href="file.css"type="text/css" media="all" />
Simplified stylesheet linking
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 17/71
New tagsin HTML5
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 18/71
<header>
<footer>
<aside>
<nav>
<div class=”content”>
<article>
<section>
<hgroup>
<section>
<dialog>
<p>
etc...
<figure>
<figcaption>
<img />
<details>
<summary>
<p>
etc...
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 19/71
But the aforementioned tags
don’t work well in InternetExplorer (IE8 and older).
To make IE behave, youcan use an “HTML5 shim”
JavaScript library...
code.google.com/p/html5shim
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 20/71
... but this requires extra code and adds a bit
of fragility to your site (IE breaks w/ JS off).
The up-side is improved semantic richness. In
practicality though, there are not (yet) anytangible SEO or accessibility gains to be had.
Given the trade-offs involved, and lack oftangible benefit, we’d recommend continuing
to use <div> with “HTML5” class names...
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 21/71
<div class=”header”>
<div class=”footer”>
<div class=”aside”>
<div class=”nav”>
<div class=”content”>
<div class=”article”>
<div class=”section”>
<div class=”hgroup”>
<div class=”section”>
<div class=”dialog”>
<p>
etc...
<div class=”figure”>
<div class=”figcaption”>
<img />
<div class=”details”>
<div class=”summary”>
<p>
etc...
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 22/71
... that way, you are writing code with the
“semantics” of the new HTML5 tags, without
the headaches of worrying about legacy
browser support. Then, one great day when
IE8 no longer has significant market-share,you can “flip the switch” so to speak.
Now that we’ve got those tags out of theway, let’s talk about the fun parts of HTML5.
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 23/71
<canvas>+ <svg>Though SVG (Scalable Vector Graphics)
pre-dates HTML5, it is finally viable now
that IE9 supports it. This means all major
browsers will support SVG and canvas.
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 24/71
We won’t cover <svg> or <canvas> in
detail during this talk, but two helpful
JavaScript libraries are worth noting...Raphaël (SVG) – Dmitry Baranovskiy Processing JS (Canvas) – John Resig
http://www.raphaeljs.com/ http://www.processingjs.org/
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 25/71
SVG is like construction paper. Layers retaindistinct shapes. SVG files can live without JS.
http://www.flickr.com/photos/124330160/2127121118/
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 26/71
Canvas is like a whiteboard drawing. No layers.Note: Canvas only works in the browser via JS.
http://www.flickr.com/photos/azuriblue/3350954960/
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 27/71
Canvas demos – ChromeExperiments.com
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 28/71
New <form> elements
<select><option> ...
<textarea></textarea> <input type="checkbox" /> <input type="file" /> <input type="radio" /> <input type="text" />
... etc. <input type="date" /> <input type="datetime" /> <input type="email" /> <input type="month" /> <input type="number" /> <input type="range" /> <input type="tel" /> <input type="time" />
<input type="url" />
HTML4,XHTML(and HTML5)
New inHTML5
All f l O
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 29/71
All form elements – in Opera
Ad HTML5 k b d b l d
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 30/71
http://www.diveintohtml5.org/forms.html
Adaptive HTML5 keyboards on mobile devices
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 31/71
HTML5“Apps”
E l S C d
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 32/71
Example – ScrumCards.net
iOS – Home screen app icon.
<link rel=”apple-touch-icon” />
iOS – No browser chrome.
Status bar color can be set.
Android – Browser chrome
always present. Caching only.
M ki HTML5 “ ” i
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 33/71
Making an HTML5 “app” is pretty easy
* if l fil ffli
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 34/71
*.manifest lets you store files offline
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 35/71
http://www.sencha.com/products/touch/
Ph G h l HTML5 “ ti ”
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 36/71
http://www.phonegap.com/
PhoneGap helps HTML5 power “native” apps
HTML5’ ( i t l) J S i t API
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 37/71
HTML5’s (experimental) JavaScript APIs
Desktop Features – Drag and drop – Live notifications
Browser Database – Web SQL – IndexedDB
Much Much More!
– document.querySelector – Geolocation
– localStorage – Web workers
Cool! But not(yet) ready for
prime-time.
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 38/71
<video>How do we make
it work reliably?
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 39/71
Flash was the mostreliable way to play
video on the web.
Roughly 99% of
all desktops haveFlash player.
iPhone/iPad don’t.
They do supportHTML5 <video>
http://www.apple.com/hotnews/thoughts-on-flash/
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 40/71
H.264 = MoneyFiguratively + Literally... It’s themost widely supported format.
But licensing costs browsermakers $5 million a year.
http://www.readwriteweb.com/archives/will_idealism_be_firefoxs_downfall.php
H 264 support in the “Big 5”
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 41/71
Internet Explorer 9 Google Chrome Safari
Firefox Opera
H.264 support in the Big-5
YES
NO
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 42/71
Ogg = “Ugh!”Nobody wants to re-encodecountless hours of video so
Firefox & Opera can play it.– And have it look sub-par.
http://www.xiph.org/ogg/
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 43/71
WebM/VP8From: Google, Mozilla, Adobe.Looks great. Is open source.
IE9 is on the fence. It doesn’t(yet) work on mobile devices.
http://www.webmproject.org/
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 44/71
1 file to rule them all...
H.264 via HTML5 with a fallback to Flash or Silverlight (playing the
same file) if the browser cannot
play H.264 natively via <video>.
http://www.mediaelementjs.com/
Native <video> UI controls
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 45/71
Native <video> UI controls
OPERA
SAFARI
FIREFOX
CHROME
IE9
http://dev.opera.com/articles/view/custom-html5-video-player-with-css3-and-jquery/
CSS styled video controls MediaElementJS com
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 46/71
CSS styled video controls – MediaElementJS.com
JavaScript <video> libraries
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 47/71
JavaScript <video> libraries
– videojs.com – projekktor.com
– jwplayer.com – jilion.com/sublime/video
– mediaelementjs.com
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 48/71
CSS3not HTML5but is still
awesome
CSS3 gradients
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 49/71
.gradient { background: #eee url(gradient.png) repeat-x;
background: -webkit-gradient(linear, left top,left bottom,color-stop(0, #fff),color-stop(1, #eee));
background: -moz-linear-gradient(top center,#fff 0%,#eee 100%);
}
CSS3 gradients
The first declaration works in all browsers. The second is for
Safari and Google Chrome, which both use the WebKitrendering engine. The last is for Firefox (Mozilla prefix).
Tip: Crop gradient images from a screenshot of a CSS3page render. Ensures visual consistency and saves work.
westciv com/tools/gradients
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 50/71
westciv.com/tools/gradients
CSS3 box-shadow
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 51/71
.drop_shadow {
-webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 2px 5px;
-moz-box-shadow: rgba(0, 0, 0, 0.5) 0 2px 5px;
box-shadow: rgba(0, 0, 0, 0.5) 0 2px 5px;
}
CSS3 box-shadow
The first declaration is for Safari and Chrome. The second isfor Firefox. The third is for all browsers, which will eventuallysupport box-shadow without a prefix.
Currently: Opera and IE9 support it.
CSS3 border-radius
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 52/71
.rounded_corners {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
CSS3 border-radius
The first line is for Safari and Chrome. Second is for Firefox.The third is for all browsers, which will eventually supportborder-radius without a prefix. Currently: Opera and IE9.
More border-radius code here:gist.github.com/262663
CSS3 text-shadow
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 53/71
.text_shadow {text-shadow: rgba(0, 0, 0, 0.5) 0 1px 1px;
}
CSS3 text-shadow
Thankfully, all browsers that support text-shadow do so withthe exact same syntax: Chrome, Safari, Firefox, Opera.
– No word from IE9 yet.
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 54/71
@font-faceTimes + Helveticahave a posse
Common fonts on Windows + Mac
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 55/71
Common fonts on Windows + Mac
Times
Georgia
Arial -or-
Helvetica
Courier
Palatino
Comic Sans
Trebuchet
Verdana
... etc.
http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html
How can we use non-common fonts?
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 56/71
How can we use non common fonts?
Flat images: It works. But hard to maintain.
sIFR: Pretty. Uses Flash. Fails on iPhone/iPad.
Can be affected by ad-blocking extensions.
Cufón: Better. Uses JavaScript + <canvas>.
But can be intensive. Best used on headlines.
@font-face: No scripting. Pure CSS. Can be
used for any text. Yet tricky to implement.
Paul Irish’s “Bulletproof @font-face syntax”
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 57/71
Paul Irish s Bulletproof @font face syntax
http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
@font-face
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 58/71
@font face
@font-face {font-family: 'GentiumRegular';
src: url('genr102_0-webfont.eot');src: local('☺'), url('genr102_0-webfont.woff') format('woff'), url('genr102_0-webfont.ttf') format('truetype'),url('genr102_0-webfont.svg#webfontX7s0ZYjS') format('svg');
}
p {
font-family: 'GentiumRegular';}
File generatorfontsquirrel.com/fontface/generator
Google fonts API (super easy)code.google.com/webfonts
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 59/71
Bible Web App
HTML5 + CSS3 + @font-face
biblewebapp.com
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 60/71
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 61/71
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 62/71
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 63/71
“Slablet”
HTML5 + CSS3 + JavaScript
host.sonspring.com/slablet
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 64/71
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 65/71
Social “Graph”Cool! But who owns your data?
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 66/71
Lots of standards and
protocols that aren't really
being used right now.
Facebook “Like”: not open,
social, or graphic. But funand gives advertisers data.
Helpful tool for adding “Like” buttons
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 67/71
http://www.openlike.org/
p g
Open social data – A cautionary tale...
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 68/71
p y
http://www.youropenbook.org/
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 69/71
HTML5 Resources – alistapart.com/articles/get-ready-for-html-5
– dev.w3.org/html5/spec/Overview.html
– diveintohtml5.org – html5.org
– html5demos.com
– html5doctor.com
– sencha.com/products/touch
– w3schools.com/html5
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 70/71
CSS3 Resources – border-radius.com
– code.google.com/webfonts
– css3.info
– css3generator.com
– css3please.com
– fontsquirrel.com
– modernizr.com – w3.org/Style/CSS/current-work
– westciv.com/tools
slideshare.net/nathansmith/echo-html5
7/31/2019 HTML5 & the Today of the Web
http://slidepdf.com/reader/full/html5-the-today-of-the-web 71/71
Questions?John Dyer
– twitter.com/ johndyer – johndyer.name
Nathan Smith – twitter.com/nathansmith – sonspring.com
top related