html 5

37
HTML 5 Karthik Madhavan S7, CS (2006-2010)

Upload: karthik-madhavan

Post on 19-Jan-2015

1.314 views

Category:

Education


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: HTML 5

HTML 5

Karthik MadhavanS7, CS (2006-2010)

Page 2: HTML 5

2

Contents Introduction to HTML.

Why HTML5?

HTML 5 an overview

HTML5 features

Difference between HTML4 and HTML5

Future scope

Conclusion

Page 3: HTML 5

3

HTML : An Outline

Stands for Hyper Text Markup Language.

Not a programming language, it is a markup language.

A markup language is a set of markup tags.

Markup tags are used to describe web pages.

Page 4: HTML 5

4

TAGSKeywords surrounded by angle brackets < > like <html>They come in pairs like <b> and </b>Common tags are :-

<html><head><div><body>

• <a>• <p>• <h1>

Page 5: HTML 5

5

Page 6: HTML 5

6

Document Object ModelCross platform, language independent modelRepresents and interacts with objects in HTML

documents

Page 7: HTML 5

7

Why HTML5 ?

HTML4 hasn’t been updated for about 10 years.

XHTML was introduced but it made things stricter and

not easier.

Embedding audio/video was dependent on flash etc.

New websites have to be interactive.

Page 8: HTML 5

8

HTML4 - drawbacksIt does not adequately support web applications.

Complex structuring of web pages.

Complex DTDs

Need plug-ins to embed audio and video.

Does not support drag and drop features, editing, drawing, error handling etc

Page 9: HTML 5

9

An Overview• HTML5 (referred to as Web Applications 1.0) is an

improvement of HTML4.0 and XHTML1.0

• Work started in 2003 by W3C and WHATWG

• Released a draft version in 2008.

• A change from document markup language to a web application language.

• An attempt to enhance the functionality and flexibility of the web.

Page 10: HTML 5

10

…contd.• Provides interoperability.

• Backward compatible

• New features like form control, APIs, multimedia, structure semantics , local storage etc.

• Consistent and defined error handling

• Internal data storage.

Page 11: HTML 5

11

HTML5 FEATURESNew elements Structural elements

Multi-media elements Inline elementsNew input typesNew attributesLocal StorageNew APIs

Page 12: HTML 5

12

Structural elements

Structuring in HTML4

Page 13: HTML 5

13

Structuring in HTML5;

Page 14: HTML 5

14

Page 15: HTML 5

15

Page 16: HTML 5

16

<section>

<article>

<aside>

<header>

<footer>

<nav>

<dialog>

Structural Tags

Page 17: HTML 5

17

Multimedia Elements

<canvas> a resolution-dependent bitmap canvas, which can be

used for rendering graphs, game graphics, or other visual images on the fly.

2D drawing area controlled by JS. set of functions in ‘canvas API’ for drawing shapes, defining

paths, transformations etc Scripting enabled environment.

Page 18: HTML 5

18

Page 19: HTML 5

19

<video>

Embed video in web pages

Does not require 3rd party plug-ins like Apple

QuickTime or Adobe Flash Player.

No detection script required

Attributes like src, autoplay, loop etc

JS to fall back to plug-ins if browser does not support

<video>

Page 20: HTML 5

20

Page 21: HTML 5

21

Page 22: HTML 5

22

<audio>

sound or audio stream

attributes like src, auto buffer, loop, controls etc

audio = new audio( [ url ] ) creates an audio element ,assigns arc=url

Page 23: HTML 5

23

Inline Elements

<mark> -denoted a bit of text that is marked in someway

<time> - denoted time or date in a block

<meter> - to indicate the measure or count. Multiple attributes like min, max, low, high etc possible.

<progress> - progress bar

Page 24: HTML 5

24

New Form Input Types

datetime date month week time number range email url

Page 25: HTML 5

25

auto focus and omission of attributes

<form action="" method="get"> <p><label>Search: <input name=search type="text“

id="search"></label></p> <script> document.getElementById('search').focus()

</script> <!-- the rest of the form --></form>

can be replaced by

<form> <p><label>Search: <input name=search autofocus></label></p>

<!-- the rest of the form -->

Page 26: HTML 5

26

Form Validation

Page 27: HTML 5

27

Page 28: HTML 5

28

Attributes contenteditable attribute indicates that the element is

an editable area. contextmenu attribute can be used to point to a context

menu provided by the author. draggable attribute can be used together with the new

drag & drop API. hidden attribute indicates that an element is not yet, or

is no longer, relevant. spellcheck attribute allows for hinting whether content

can be checked for spelling or not.

Page 29: HTML 5

29

Local StorageA mechanism for websites to store data locally and

retrieve them.

Like cookies, but for larger data.

Data stays in the local system and can access using JS after page load.

Provides offline capabilities (Google Gears) in the browser.

Page 30: HTML 5

30

APIs

2D drawing API that can be using with the canvas element.

API for playing of video and audio which can be used with the new video and audio elements.

An API that enables offline Web applications.

Editing API in combination with a new global contenteditable attribute.

Page 31: HTML 5

31

Page 32: HTML 5

32

Page 33: HTML 5

33

HTML5 vs. HTML4

Support of multimediaLanguage for web applications rather than document

markup languageLocalized data speeding up caching .searching etc<canvas> tag for 2D graphicsAPIs for in-browser application allowing editing, drag and

drop etc

Page 34: HTML 5

34

Future ScopeCan get rid of proprietary add-ons (like

Flash/Silverlight/JAVAFX) Web apps faster with better user experience Difference between desktop and web apps blurred.Standard for web applications

Page 35: HTML 5

35

Page 36: HTML 5

36

ReferencesA preview of HTML5, Lachlan Hunt, (2007) ‘A LIST APART’.HTML5 Introduction, Richard Keyes (2009) ‘An introduction

to HTML5 and its features; The Code Project’ Difference b/w HTML5 and HTML4, Anne van Keesteren

(2008); Opera Software OSAHTML5 Reference, Lachlan Hunt (2009), W3CHTML5 and After, Paul Krill (2009), InfoWorld

Page 37: HTML 5

37

Thank you..

Queries !!