Top Banner
HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20, 2011 Jason Clark Head of Digital Access & Web Services Montana State University Libraries
30

HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Jul 09, 2020

Download

Documents

dariahiddleston
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: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

HTML5 and CSS3: New Markup & Styles for the Emerging Web

Computers in Libraries March 20, 2011

Jason Clark Head of Digital Access & Web Services Montana State University Libraries

Page 2: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Overview

•  Revolution or Evolution? •  New Features and Functions •  Demos •  Getting Started • Questions

Page 3: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Hello, My Name is…

•  Background, Position •  HTML, Programming experience? •  Experience with CSS3? •  What do you want to learn most?

Page 4: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Terms: HTML, CSS, API

Does everybody know what these elements are?

CSS - style rules for HTML documents

HTML - markup tags that structure docs - browsers read them and display according to rules

API (application programming interface) - set of routines, protocols, and tools for building software applications

Page 5: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

http://www.w3.org/History/19921103-hypertext/hypertext/WWW/Link.html

Page 6: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Chrome Experiments

Arcade Fire - The Wilderness Downtown http://www.chromeexperiments.com/arcadefire/

Page 7: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

HTML5 as "umbrella" Term

•  Changes to HTML spec •  Additions to CSS spec •  New Javascript APIs

Page 8: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Evolution into HTML5

Reacting to how the web is used

Page 9: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

A Minimal HTML5 Document

<!DOCTYPE html> <html lang="en"> <head>

<meta charset="utf-8"> <title>title</title> <link rel="stylesheet" href="style.css"> <script src="script.js"></script>

</head> <body>

<!-- page content --> </body> </html>

Page 10: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Semantic & Functional Markup

•  header •  footer •  nav •  section •  article •  aside •  mark •  contenteditable attribute

Page 11: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Native Video and Audio

•  simple markup •  no plugin! •  limited formats: .ogv, .mp4

<video src="turkish.mp4" controls></video>

Page 12: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Forms <form>

•  field types - email, date •  validation •  regular expressions •  still need to watch for security/hacks

Page 13: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

<form> Markup

<input type="email" required> <input type="date"> <input type="url"> <input type="email" required autofocus>

Page 14: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Geolocation

•  w3c API •  accurate •  supported in Firefox 3.6, Safari 4

Page 15: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

LocalStorage

•  mega COOKIE •  remembers preferences without scripting

Page 16: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Offline Storage, Web Workers

•  work without a connection •  sqlite database •  Google discontinued Gears effort

Page 17: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Evolution into CSS3

Rethinking web displays and styles

Page 18: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Rounded Elements

•  border-radius declaration •  smooth out your interfaces •  button effects

Page 19: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Gradients/Opacity

•  no more background images •  transparency

Page 20: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

CSS3 example - http://css3exp.com/moon/

Page 21: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Media Queries

•  switch stylesheets based on width and height of viewport

•  same content, new view depending on device

@media screen and (max-device-width:480px) {…mobile styles here...}

Page 22: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Media Queries in Action

<link rel="stylesheet" type="text/css” media="screen and (max-device-width:480px) and (resolution: 163dpi)” href="shetland.css" />

Responsive Web Design, Ethan Marcotte http://www.alistapart.com/articles/responsive-web-design

Page 23: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

@Font-Face

•  bring in fonts •  use any licensed TrueType (.ttf) or

OpenType (.otf) font •  independent of machine it's being rendered

on...

Page 24: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Demos & Examples

It's your call....

Page 25: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Demos

•  YouTube HTML5 demo o http://www.youtube.com/html5

•  24 ways CSS3 demo o http://24ways.org/

•  HTML5 Demos o http://html5demos.com/

•  Other possible examples: o geolocation o  localStorage

Page 26: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

What Type of Support?

•  see "When can I use…" o http://a.deveria.com/caniuse/

•  Mobile browsers leading the way

•  Modernizr •  http://www.modernizr.com/

•  HTML5 enabling script o http://remysharp.com/2009/01/07/html5-

enabling-script/

Page 27: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Resources

•  HTML5 Tag Reference (W3Schools) o w3schools.com/html5/html5_reference.asp

•  Cross Browser Support Tables o www.findmebyip.com/litmus/

•  HTML5 Doctor o html5doctor.com/

•  CSS3 Previews (CSS3.info) o www.css3.info/preview/

•  HTML5 & CSS3 Cheat Sheets o webresourcesdepot.com/html-5-and-css3-

cheat-sheets-collection/

Page 28: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Resources (cont.)

•  HTML5 Boilerplate o http://html5boilerplate.com/

•  HTML5rocks o html5rocks.com

•  Check html5 article o www.findmebyip.com/litmus/

Page 29: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

Questions?

twitter.com/jaclark www.lib.montana.edu/~jason/talks.php

Page 30: HTML5 and CSS3 - Montana State University Libraryjason/talks/cil2011... · 2011-03-19 · HTML5 and CSS3: New Markup & Styles for the Emerging Web Computers in Libraries March 20,

http://www.gesteves.com/experiments/starwars.html