What is HTML5? HTML5 will be the new standard for HTML. The previous version of HTML, HTML 4.01, came in 1999. The web has changed a lot since then. HTML5.

Slides:



Advertisements
Similar presentations
HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3.
Advertisements

What is Multimedia ? Multi ( Multiple ) and Media ! So…. Information in multiple formats, including text, images, audio, video and animation :) It makes.
HTML5, OVERVIEW AND NEW FEATURES PowerPoint by Mason O’Mara.
Iframes & Images Using HTML.
More CSS - Page layout + HTML5 new features Boriana Koleva Room: C54
HTML 5. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML came in The web has changed.
Tim Berners-Lee authors HTML in 1991, assisted by his colleagues at CERN,
Video, audio, embed, iframe, HTML Form
HTML 5 Tutorial Chapter 1 Introduction. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML.
HTML Advanced: HTML 5. Welcome This slideshow presentation is designed to introduce you to HTML 5. It is the third of three HTML workshops available at.
Bartosz Kowalski Software Developer CERN. Presentation outline -HTML : introduction and history -HTML5 : -History and philosophy -New features -Structure.
SVG Scalable Vector Graphics. What is SVG? SVG stands for Scalable Vector Graphics SVG is used to define vector-based graphics for the Web SVG defines.
Lecture 18. HTML5 and JavaScript Instructor: Jie Yang Department of Computer Science University of Massachusetts Lowell Exploring the Internet,
WHAT IS SVG?. SVG stands for Scalable Vector Graphics SVG is used to define vector-based graphics for the Web SVG defines the graphics in XML format SVG.
Chapter 14 Introduction to HTML
CS 415 N-Tier Application Development By Umair Ashraf July 16,2013 National University of Computer and Emerging Sciences Lecture # 12 HTML/ XHTML/ HTML5.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 41 How Animation on the Web Works.
Audio and Video on the Web Sec 5-12 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Mark Branom, Continuing Studies.  HTML5 overview – what’s new?  New HTML5 elements  New HTML5 features  Guided Demonstrations  Forms  Video  Geolocation.
Session: 11. © Aptech Ltd. 2HTML5 Audio and Video / Session 11  Describe the need for multimedia in HTML5  List the supported media types in HTML5 
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
Video on the Web. The Evolution of web video formats… WebM (Supported by Google) Ogg (Supported by Theora) Mp4 (h264 video encoding) WebM (Supported by.
HTML5. What is HTML5? HTML5 will be the new standard for HTML. HTML5 is the next generation of HTML. HTML5 is still a work in progress. However, the major.
Week 09, Session 01 Other HTML Tags & HTML5 IF Website Development Presented by: RDT.
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
Director of Computer Center, DaYeh University Ku-Yaw Chang.
What is Web Design?  Web design is the creation of a Web page using hypertext or hypermedia to be viewed on the World Wide Web.
Building the User Interface by Using HTML5: Text, Graphics, and Media Lesson 2.
HTML Advanced: HTML 5. Introduction to HTML 5 These slides are based on source material found at the w3schools.com website.
The New Elements © Main Menu Structure Media Canvas Form Click on one of the categories below to view information about the new HTML5 elements in.
Proglan Session 1. .  HTML5 will be the new standard for HTML.  The previous version of HTML, HTML 4.01, came in The web has changed a lot since.
JavaScript, Fourth Edition
Tutorial 7 Working with Multimedia. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Explore various multimedia applications.
Tutorial 7 Working with Multimedia. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Explore various multimedia applications.
Introduction to HTML. What is HTML?  Hyper Text Markup Language  Not a programming language but a markup language  Used for presentation and layout.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
تکنیک های پیشرفته در برنامه سازی وب ) اسلايد نهم SVG - ) جوانمرد Website: به نام خدا.
HTML5&CSS3. Webpage Editors Notepad++ TextWrangler (Mac Users) Dreamweaver Editplus plus.sourceforge.net/uk/site.htm
HTML5 Gaurav Jaiswal Singsys Pte. Ltd.. What is HTML5?
HTML 5 Tutorial Chapter 3 Video. Video HTML 5.0 provides a standard for showing video. Using the element we can easily embed video within our web page.
CHAPTER 15 HTML 5 VIDEO AND AUDIO Intro to HTML5 1.
Objective: To describe the evolution of the Internet and the Web. Explain the need for web standards. Describe universal design. Identify benefits of accessible.
Chapter 11 Adding Media and Interactivity. Chapter 11 Lessons Introduction 1.Add and modify Flash objects 2.Add rollover images 3.Add behaviors 4.Add.
Rich Internet Applications 9. HTML 5 and RIAs. HTML 5 Standard currently under development by W3C Aims to improve the language with support for the latest.
Presented By Nanda Kumar(972789) P. Trinesh (982816) Sk. Salma (982824) K. Madhuri (982814) HTML5.
(1) HTML5, CSS, Twitter Bootstrap. (2) HTML5 Will be the new standard New features Drag and Drop and Support for local storage,,,, New input types Removed.
SVG technology SVG technology is what we want? is what we want? Jaehoon Woo KNU Real-Time Systems Lab. KNU Real-Time Systems Lab.
TNPW1 Ing. Jiří Štěpánek.  In current version (XHTML 1.0 strict)  No multimedia elements  No semantics elements  Only few input types  Only few document.
Using HTML5 to Build Offline Applications Woody Pewitt Icenium
HTML 5 (Part 1) – Start from SCRATCH. HTML 5 – Start from SCRATCH.
Part – 3 : HTML 5 SVG Tag. † SVG stands for Scalable Vector Graphics. † SVG is used to define vector-based graphics for the Web. † SVG defines the graphics.
WHAT IS SVG?. ESSENTIAL QUESTIONS What challenges do mobile devices present to Web designers? What are the basic concepts of responsive web design?
XHTML. What Is XHTML? XHTML stands for EXtensible HyperText Markup Language XHTML is almost identical to HTML XHTML is stricter than HTML XHTML is HTML.
The HTML5 logo was introduced by W3C in 2010
Chapter 17 The Need for HTML 5.
HTML 5.
Internet of the Past.
Gaurav Jaiswal Singsys Pte. Ltd.
What is SVG?.
Scalable vector graphics
HTML5 – The Saga Continues
PPT By:Gaurav Jaiswal Singsys Pte. Ltd.
HTML 5 Tutorial Chapter 1 Introduction.
Application with Cross-Platform GUI
Playing Audio (Part 1).
HTML 5 Training HTML 5 SYMANTICS [Notes to trainer:
Creating a Basic Web Page using HTML
HTML5 - 2 Forms, Frames, Graphics.
What is SVG?.
Presentation transcript:

What is HTML5? HTML5 will be the new standard for HTML. The previous version of HTML, HTML 4.01, came in The web has changed a lot since then. HTML5 is still a work in progress. However, the major browsers support many of the new HTML5 elements and APIs.

New Features The element for 2D drawing. The and elements for media playback. Support for local storage. New content-specific elements, like,,,,. New form controls, like calendar, date, time, , url, search.

Minimum HTML5 Document Title of the document The content of the document......

Video HTML5 defines a new element which specifies a standard way to embed a video/movie on a web page: the element.

Example Your browser does not support the video tag.

Video Formats and Browser Support BrowserMP4WebMOgg Internet Explorer 9YESNO Firefox 4.0NOYES Google Chrome 6YES Apple Safari 5YESNO Opera 10.6NOYES

HTML5 Video Tags TagDescription Defines a video or movie Defines multiple media resources for media elements, such as and Defines text tracks in mediaplayers

HTML5 - Methods, Properties, and Events MethodsPropertiesEvents play()currentSrcplay pause()currentTimepause load()videoWidthprogress canPlayTypevideoHeighterror durationtimeupdate ended errorabort pausedempty mutedemptied seekingwaiting volumeloadedmetadata height width

DEMO asVideo.html asVideo.html materials_video.html materials_video.html

Video + DOM There are methods for playing, pausing, and loading, for example. There are properties (e.g. duration, volume, seeking) that you can read or set. There are also DOM events that can notify you, for example, when the element begins to play, is paused, is ended, etc.

Example … Your browser does not support HTML5 video. var myVideo=document.getElementById("video1"); function playPause() { if (myVideo.paused) myVideo.play(); else myVideo.pause(); } ¡K. …

HTML5 - Methods, Properties, and Events MethodsPropertiesEvents play()currentSrcplay pause()currentTimepause load()videoWidthprogress canPlayTypevideoHeighterror durationtimeupdate ended errorabort pausedempty mutedemptied seekingwaiting volumeloadedmetadata height width

DEMO

Audio Until now, there has not been a standard for playing audio files on a web page. Today, most audio files are played through a plug-in (like flash). However, different browsers may have different plug-ins. HTML5 defines a new element which specifies a standard way to embed an audio file on a web page: the element.

Example Your browser does not support the audio element.

Audio Formats and Browser Support BrowserMP3WavOgg Internet Explorer 9 YESNO Firefox 4.0NOYES Google Chrome 6 YES Apple Safari 5YES NO Opera 10.6NOYES

HTML5 Audio Tags TagDescription Defines sound content Defines multiple media resources for media elements, such as and

DEMO

Canvas The HTML5 element is used to draw graphics, on the fly, via scripting (usually JavaScript). The element is only a container for graphics, you must use a script to actually draw the graphics. A canvas is a drawable region defined in HTML code with height and width attributes. Canvas has several methods for drawing paths, boxes, circles, characters, and adding images.

Canvas 2D var canvasContext = document.getElementById("canvas").getContext("2d"); canvasContext.fillRect(250, 25, 150, 100); canvasContext.beginPath(); canvasContext.arc(450, 110, 100, Math.PI * 1/2, Math.PI * 3/2); canvasContext.lineWidth = 15; canvasContext.lineCap = 'round'; canvasContext.strokeStyle = 'rgba(255, 127, 0, 0.5)'; canvasContext.stroke();

Canvas API

Canvas 3D(WebGL) var gl = document.getElementById("canvas").getContext("experimental- webgl"); gl.viewport(0, 0, canvas.width, canvas.height);...

Canvas 3D Plane canvas-webgl-plane-with-three-js/

WebGL API GL_Cheat_Sheet.htm

DEMO

SVG SVG 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

Advantages Advantages of using SVG over other image formats (like JPEG and GIF) are: SVG images can be created and edited with any text editor SVG images can be searched, indexed, scripted, and compressed SVG images are scalable SVG images can be printed with high quality at any resolution SVG images are zoomable (and the image can be zoomed without degradation)

Example Example 網頁

Attributes of the tag preserveAspectRatio style version viewbox xmlns=" /2000/svg" The xmlns attribute declares the namespace for all of the SVG elements. Since the xmlns attribute is inherited by child elements and descendants, it does not need to be coded on other tags in the content of the svg element, unless they are in a different namespace such as the HTML namespace.namespaceHTML namespace

Attributes of the tag cx, cy center rradius Attributes of the tag x1, y1 x2, y2

Attributes of the tag fx, fy r spreadMet hod Attributes of the tag x,yx,y width, height

Attributes of the tag offset stylestop-color: stop-opacity:

DEMO dxml/tiger.svg dxml/tiger.svg

Geolocation The HTML5 Geolocation API is used to get the geographical position of a user. Since this can compromise user privacy, the position is not available unless the user approves it.

Example Click the button to get your coordinates: Try It var x=document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else{x.innerHTML="Geolocation is not supported by this browser.";} } function showPosition(position) { x.innerHTML="Latitude: " + position.coords.latitude + " Longitude: " + position.coords.longitude; }

DEMO location.html location.html

Offline / Storage With HTML5, web pages can store data locally within the user's browser. Earlier, this was done with cookies. However, Web Storage is more secure and faster. The data is not included with every server request, but used ONLY when asked for. It is also possible to store large amounts of data, without affecting the website's performance. The data is stored in key/value pairs, and a web page can only access data stored by itself.

LocalStorage and SessionStorage There are two new objects for storing data on the client: localStorage - stores data with no expiration date sessionStorage - stores data for one session

LocalStorage Example html html localStorage.clickcount=Number(localStorage.clickc ount)+1; document.getElementById("result").innerHTML="You have clicked the button " + localStorage.clickcount + " time(s).";

SessionStorage: Example ge.html ge.html sessionStorage.clickcount=Number(sessionStorage.c lickcount)+1; document.getElementById("result").innerHTML="You have clicked the button " + sessionStorage.clickcount + " time(s) in this session.";

Application Cache HTML5 introduces application cache, which means that a web application is cached, and accessible without an internet connection. Application cache gives an application three advantages: 1. Offline browsing - users can use the application when they're offline 2. Speed - cached resources load faster 3. Reduced server load - the browser will only download updated/changed resources from the server

Application Cache: Example Get Date and Time Try opening this page, then go offline, and reload the page. The script and the image should still work.

demo_html.appcache CACHE MANIFEST demo_time.js img_logo.gif

The Manifest File The manifest file has three sections: CACHE MANIFEST - Files listed under this header will be cached after they are downloaded for the first time NETWORK - Files listed under this header require a connection to the server, and will never be cached FALLBACK - Files listed under this header specifies fallback pages if a page is inaccessible

Web Workers When executing scripts in an HTML page, the page becomes unresponsive until the script is finished. A web worker is a JavaScript that runs in the background, independently of other scripts, without affecting the performance of the page. You can continue to do whatever you want: clicking, selecting things, etc., while the web worker runs in the background.

Web Workers: Example var w; function startWorker() { if(typeof(Worker)!=="undefined") { w=new Worker("demo_workers.js"); w.onmessage = function (event) { document.getElementById("result").innerHTML=event.data; }; } else { document.getElementById("result").innerHTML="Sorry, your browser does not support Web Workers..."; } function stopWorker() { w.terminate(); }

Server-Sent Events A server-sent event is when a web page automatically gets updates from a server. This was also possible before, but the web page would have to ask if any updates were available. With server- sent events, the updates come automatically.

Server-Sent Events: Example Getting server updates if(typeof(EventSource)!=="undefined") { var source=new EventSource("demo_sse.php"); source.onmessage=function(event) { document.getElementById("result").innerHTML+=event.data + " "; }; } else { document.getElementById("result").innerHTML="Sorry, your browser does not support server-sent events..."; }