html5 overview hoangpt2. 1. general 2. new elements list 3

18
HTML5 Overview HOANGPT2

Upload: alexandrea-brittan

Post on 01-Apr-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

HTML5 OverviewHOANGPT2

Page 2: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

1. General

2. New Elements List

3.

Page 3: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

Minimum required tags<!DOCTYPE html><html>

<head><title>Title of the document</title>

</head>

<body>The content of the document......</body>

</html>

Page 4: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

Browsers’ supportHTML5 is not yet an official standard, and no browsers have full HTML5 support.

But all major browsers (Safari, Chrome, Firefox, Opera, Internet Explorer) continue to add new HTML5 features to their latest versions.

Go to http://html5demos.com/ to view more which features are supported by 5 major browsers

Page 5: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

TagsTo see all tags, go to http://www.w3schools.com/tags/default.asp

Tag Description<!--...--> Defines a comment<!DOCTYPE> Defines the document type<a> Defines a hyperlink<abbr> Defines an abbreviation<acronym> Not supported in HTML5. Defines an acronym<address> Defines contact information for the author/owner of a document

<applet> Not supported in HTML5. Deprecated in HTML 4.01. Defines an embedded applet

Tag Description<!--...--> Defines a comment<!DOCTYPE> Defines the document type<a> Defines a hyperlink<abbr> Defines an abbreviation<acronym> Not supported in HTML5. Defines an acronym<address> Defines contact information for the author/owner of a document

<applet> Not supported in HTML5. Deprecated in HTML 4.01. Defines an embedded applet

Page 6: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

New Elements in HTML5The internet has changed a lot since HTML 4.01 became a standard in 1999.

Today, some elements in HTML 4.01 are obsolete, never used, or not used the way they were intended to. These elements are removed or re-written in HTML5.

To better handle today's internet use, HTML5 includes new elements for better structure, better form handling, drawing, and for media content.

Page 7: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

New Elements in HTML5New Semantic/Structural Elements

HTML5 offers new elements for better structure

To see all tags, go to

http://www.w3schools.com/html/html5_new_elements.asp

Page 8: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

New Elements in HTML5New Media Elements

HTML5 offers new elements for media content

To see all tags, go to http://www.w3schools.com/html/html5_new_elements.asp

Page 9: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

New Elements in HTML5The new <canvas> Element

To see all tags, go to http://www.w3schools.com/html/html5_new_elements.asp

Page 10: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

New Elements in HTML5New Form Elements

HTML5 offers new form elements, for more functionality

To see all tags, go to http://www.w3schools.com/html/html5_new_elements.asp

Page 11: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

Removed ElementsThe following HTML 4.01 elements are removed from HTML5:

◦ <acronym>◦ <applet>◦ <basefont>◦ <big>◦ <center>◦ <dir>◦ <font>◦ <frame>◦ <frameset>◦ <noframes>◦ <strike>◦ <tt>

Page 12: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

HTML5 CanvasThe <canvas> element is used to draw graphics, on the fly, on a web page.

Draw a red rectangle, a gradient rectangle, a multicolor rectangle, and some multicolor text onto the canvas:

To see more, go to http://www.w3schools.com/html/html5_canvas.asp

Page 13: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

HTML5 Canvas

Page 14: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

HTML5 Canvas

Page 15: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

HTML5 Inline SVGSVG stands for Scalable Vector Graphics

SVG is used to define vector-based graphics for the Web

SVG defines the graphics in XML format

SVG graphics do NOT lose any quality if they are zoomed or resized

Every element and every attribute in SVG files can be animated

SVG is a W3C recommendation

To see more, go to http://www.w3schools.com/html/html5_svg.asp

Page 16: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

HTML5 Inline SVG

Canvas SVG

Canvas draws 2D graphics, on the fly (with a JavaScript).

SVG is a language for describing 2D graphics in XML.

Canvas is rendered pixel by pixel. SVG is XML based, which means that every element is available within the SVG DOM. You can attach JavaScript event handlers for an element.

In canvas, once the graphic is drawn, it is forgotten by the browser. If its position should be changed, the entire scene needs to be redrawn, including any objects that might have been covered by the graphic.

In SVG, each drawn shape is remembered as an object. If attributes of an SVG object are changed, the browser can automatically re-render the shape.

Page 17: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

HTML5 Inline SVG

Canvas SVG

Resolution dependent Resolution independent

No support for event handlers Support for event handlers

Poor text rendering capabilities Best suited for applications with large rendering areas (Google Maps)

You can save the resulting image as .png or .jpg Slow rendering if complex (anything that uses the DOM a lot will be slow)

Well suited for graphic-intensive games Not suited for game applications

Page 18: HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3

HTML5 Drag and DropDrag and drop is a very common feature. It is when you "grab" an object and drag it to a different location.

In HTML5, drag and drop is part of the standard, and any element can be draggable.

To see more, go to http://www.w3schools.com/html/html5_draganddrop.asp