i love html5

35
I Love HTML5

Upload: shravan-kumar-kasagoni

Post on 30-Nov-2014

1.020 views

Category:

Technology


1 download

DESCRIPTION

HTML5

TRANSCRIPT

Page 1: I Love HTML5

I Love HTML5

Page 2: I Love HTML5

Buildin

g Nex

t Gen

erat

ion W

eb

Applicat

ions

Page 3: I Love HTML5

Who Am I?Shravan Kumar KasagoniTechnical Fellow @ Thomson ReutersMicrosoft MVP – ASP.NET & IIS

http://theshravan.net@techieshravan

Page 4: I Love HTML5
Page 5: I Love HTML5

Rough Timeline of Web Technologies

1991HTML

1994HTML 2

1996CSS 1 +

JavaScript

1997HTML 4

1998CSS 2

2000XHTML 1

2002 Tableless

Design

2005AJAX

2009HTML 5

Page 6: I Love HTML5

2022

Page 7: I Love HTML5

What is HTML 5?

HTML 5 != HTMLHTML 5 IS NOT JUST

HTML

Page 8: I Love HTML5
Page 9: I Love HTML5

Just a marketing message

Page 10: I Love HTML5

HTML5 is...

the future of the web

still under development

a huge spec

Page 11: I Love HTML5

The “map” of HTML5

W3C

HTML

HTM

L5C

anvas 2

D C

onte

xt

Micro

data

HTM

L+R

DFa

HTM

L5 M

arku

pH

TM

L5 D

iff fro

m H

TM

L4Po

lyglo

t Marku

pTe

xt a

ltern

ativ

es

CSS

CS

S S

nap

shot 2

007

CS

S N

am

esp

ace

sC

SS

Paged M

edia

CS

S P

rint P

rofile

CS

S V

alu

es a

nd

Un

its

CS

S C

asca

din

g a

nd

In

herita

nce

CS

S Te

xt

CS

S W

riting M

od

es

CS

S Lin

e G

ridC

SS

Rub

y

CS

S G

en

era

ted

Con

ten

t for Pa

ged

M

ed

ia

CS

S B

ack

gro

und

s and

B

ord

ers

CS

S Fo

nts

CS

S B

asic B

ox M

od

el

CS

S M

ulti-co

lum

n La

yout

CS

S Te

mp

late

Layou

tC

SS

Med

ia Q

uerie

sC

SS

Sp

eech

CS

S C

olo

rC

SS

Basic U

ser In

terfa

ce

CS

S S

cop

ing

CS

S G

rid Po

sition

ing

CS

S Fle

xib

le B

ox La

you

tC

SS

Imag

e V

alu

es

CS

S 2

D Tra

nsfo

rmatio

ns

CS

S 3

D Tra

nsfo

rmatio

ns

CS

S Tra

nsitio

ns

CS

S A

nim

atio

ns

Web Apps

CO

RS

Ele

men

t Traversa

lFile

API

Index D

B

Pro

gra

mm

ab

le H

TTP C

ach

ing

an

d

Serv

ing

Pro

gre

ss Even

tsS

ele

ctors A

PI

Sele

ctors A

PI L2

Serv

er-S

ent E

vents

Unifo

rm M

essa

gin

g

Policy

Web

DO

M C

ore

Web

SQ

L Data

base

Web

IDL

Web

Socke

ts API

Web

Sto

rag

eW

eb

Worke

rsX

mlH

ttpR

eq

uest

Xm

lHttp

Req

uest L2

DO

M L1

DO

M L2

Core

DO

M L2

Vie

ws

DO

M L2

Even

tsD

OM

L2 S

tyle

DO

M L2

Traversa

l an

d

Rang

e

DO

M L2

HTM

LD

OM

L3 C

ore

DO

M L3

Even

tsD

OM

L3 Lo

ad

an

d S

ave

DO

M L3

Valid

atio

nD

OM

L3 X

Path

DO

M L3

Vie

ws a

nd

Form

attin

g

DO

M L3

Abstra

ct S

chem

as

SVG

Docu

men

t Stru

cture

Basic S

hapes

Path

sTe

xt

Tran

sform

sPain

ting, Fillin

g, C

olo

rS

criptin

gS

tylin

gG

radie

nts a

nd P

atte

rns

SM

ILFo

nts

Filters

Geolo

catio

nG

eolo

catio

n A

PI

ECMA

ECMA Script

262

EC

MA

Scrip

t 26

2

Page 12: I Love HTML5

Specification lifecycle

Last call Call to implement

First Public Working Draft Working Draft

Candidate Recommendatio

n

Proposed Recommendatio

n

Recommendation

Page 13: I Love HTML5

HTML5

HTMLECMA

Script 5CSS 3

JS API’S +

etc.

Page 14: I Love HTML5

What’s New Markup – HTML

Page 15: I Love HTML5

New Markup Elementsarticle figcaption progress

aside footer ruby

bdi header rt

command hgroup rp

details mark section

summary meter time

figure nav wbr

http://w3schools.com/html5/default.asp

Page 16: I Love HTML5

New Media Elementsaudio For multimedia content, sounds, music or

other audio streams

video For video content, such as a movie clip or other video streams

source For media resources for media elements, defined inside video or audio elements

embed For embedded content, such as a plug-in

track For text tracks used in mediaplayers

Page 17: I Love HTML5

The Canvas Element

<canvas></canvas>

http://w3schools.com/html5/default.asp

Page 18: I Love HTML5

New Form Elements

datalist A list of options for input values

keygen Generate keys to authenticate users

outputFor different types of output, such as output written by a script

http://w3schools.com/html5/default.asp

Page 19: I Love HTML5

New Input Type Attribute Valuestel week

search time

url datetime-local

email number

datetime range

date color

month placeholder

http://w3schools.com/html5/default.asp

Page 20: I Love HTML5

Video Formats and Browser SupportCurrently supported video formats : MP4, WebM, Ogg

Browser MP4 WebM Ogg

Internet Explorer 9 YES NO NO

Firefox 4.0 NO YES YES

Google Chrome 6 YES YES YES

Apple Safari 5 YES NO NO

Opera 10.6 NO YES YES

Page 21: I Love HTML5

SVG Basics

XML-based

• Scriptable, extensible, easily editable• Easy to apply CSS styles

Vector graphics

• Resizable without degradation• Vector images are composed of shapes instead of pixels

Compression

• Fast download

Easy debugging

• It is just XML!

Page 22: I Love HTML5

Scalable Vector Graphics (SVG)• Support for:• Full DOM access to SVG elements• Document structure, scripting, styling, paths, shapes, colors,

transforms, gradients, patterns, masking, clipping, markers, linking and views

<svg width="400" height="200" xmlns="http://www.w3.org/2000/svg"> <rect fill="red" x="20" y="20" width="100" height="75" /> <rect fill="blue" x="50" y="50" width="100" height="75" /></svg>

Page 23: I Love HTML5

SVG or Canvas

Characteristic SVG Canvas

When to use Highly detailed drawing, charts

Programmatic rendering, games

Drawing Mode By Runtime By Application

DOM Support Each SVG element part of DOM

<CANVAS> part of the DOM

Animation Manipulating objects in the DOM

Using direct scripting in canvas

GPU acceleration

Yes Yes

Performance Best for larger surface and/or small # of objects

Best for smaller surface and/or large # of objects

Modification Tag, Script & CSS Script only

Page 24: I Love HTML5

CSS3

Page 25: I Love HTML5

CSS3

• 2nd largest spec in “HTML5”• Major revision to CSS 2.1• CSS 3

Borders & ColorsBackgrounds & ShadowsWOFF Media queriesSelectorsTransforms

Page 26: I Love HTML5

CSS3 Borders

• CSS3 Borders• Rounded corners with the border-radius property

div.top { border-radius: 152px 304px 228px 152px; border-style: double; border-width: 42px; padding: 12px;}

Page 27: I Love HTML5

CSS3 Colors

• CSS3 Colors & Transparency• Alpha color with rgba() and hsla() color functions• Transparency control with the opacity property• Full support for CSS3 color keywords

div.top { background-color: rgba(155,0,155,0.5)}div.bottom { background-color: hsla(0,100%,50%,0.2);}

Page 28: I Love HTML5

CSS3 Shadows

• CSS3 Shadows• box-shadow property on block elements• Inset & Multiple shadows

div{…box-shadow: 20px 20px 20px hsla(0,100%,50%,0.2);

}

div{…box-shadow: 20px 20px 20px hsla(0,100%,50%,0.2), -20px -20px 20px hsla(180,50%,50%,0.8);

}

Page 29: I Love HTML5

CSS3 Backgrounds

• CSS3 Backgrounds• Multiple background images per element• Comma separated values

div{

background-image: url("images/1.jpg"), url("images/2.jpg"), url("images/3.jpg");background-position: 90px 90px, 60px 60px, 30px 30px;

}

Page 30: I Love HTML5

WOFF Fonts & @font-face

Page 31: I Love HTML5

CSS3 Media Queries

• Selectively style page based on properties of the display media

<link href=“mobile.css" rel="stylesheet" media="screen and (max-width:480px)" type="text/css"/>

<link href=“netbook.css" rel="stylesheet" media="screen and (min-width:481px) and (max- width: 1024px)" type="text/css" />

<link href=“laptop.css" rel="stylesheet" media="screen and (min-width:1025px)" type="text/css" />

Page 32: I Love HTML5

CSS Selectors

• Dynamic Styling • Style elements based on parameters

such as:• Pattern matching: rounded borders for all jpg images • Element location: 1st paragraph• Many kinds of selectors:• Type selectors: all H1 elements• Attribute selectors: all autoplay videos

Page 33: I Love HTML5

CSS3 2D Transforms

• CSS3 2D Transforms• Matrix• Translate• Scale• Rotate• Skew

34

div { -ms-transform: scale(2, 2) rotate(30deg);}

Page 34: I Love HTML5

http://theshravan.net | @techieshravan

Page 35: I Love HTML5

Thank you