尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
HTML5
Gaurav Jaiswal
Singsys Pte. Ltd.
What is HTML5?
What is HTML5?
HTML5 is the new standard for HTML.
The previous version of HTML was – HTML 4.01, came in 1999.
HTML5 is designed to deliver almost everything you want to do
online without requiring additional plugins. It does everything
from animation to apps, music to movies, and can also be used
to build complicated applications that run in your browser.
HTML5 is also cross-platform (it does not care whether you are
using a tablet or a smartphone, a notebook, notebook or a
Smart TV).
Differences Between
HTML4 and HTML5
Differences Between HTML4 &
HTML5
1.
2.
3.
4.
5.
6.
7.
8.
9.

HTML5 is a work in progress
Simplified Syntax
The New <canvas> Element for 2D drawings
New content-specific elements, like
<article>, <header>, <footer>, <nav>, <section>
New <menu> and <figure> Elements
New <audio> and <video> Elements
New form controls, like
calendar, date, time, email, url, search
No More <frame>, <center>, <big>, and <b>, <font>
Support for local storage
Browser Support for
HTML5
Browser Support for HTML5
HTML5 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.
HTML5 Document
The HTML5 <!DOCTYPE>
In HTML5 there is only one <!doctype> declaration, and it is very
simple:
<!DOCTYPE html>
Minimum HTML5 Document
Below is a simple HTML5 document, with the minimum of
required tags:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>
<body>
Content of the document......
</body>
</html>
HTML5 New
Elements
The New <canvas> Element
The <canvas> element is used to draw graphics, on the fly, via
scripting (usually JavaScript).
New Media Elements
Tag

Description

<audio>

Defines sound content

<video>

Defines a video or movie

<source>

Defines multiple media resources for <video> and <audio>

<embed>

Defines a container for an external application or
interactive content (a plug-in)

<track>

Defines text tracks for <video> and <audio>
New Form Elements
Tag

Description

<datalist>

Specifies a list of pre-defined option for input controls

<keygen>

Defines a key-pair generator field (for forms)

<output>

Defines the result of a calculation
New Semantic/Structural
Elements
Tag

Description

<article>

Defines an article

<aside>

Defines content aside from the page
content

<bdi>

Isolates a part of text that might be
formatted in a different direction from
other text outside it

<command>

Defines a command button that a user
can invoke

<details>

Defines additional details that the user
can view or hide

<dialog>

Defines a dialog box or window

<summary>

Defines a visible heading for a
<details> element
New Semantic/Structural
Elements
Tag

Description

<figure>

Specifies self-contained content, like
illustrations, diagrams, photos, code
listings, etc.

<figcaption>

Defines a caption for a <figure>
element

<footer>

Defines a footer for a document or
section

<header>

Defines a header for a document or
section

<mark>

Defines marked/highlighted text

<meter>

Defines a scalar measurement within a
known range (a gauge)

<nav>

Defines navigation links
New Semantic/Structural
Elements
Tag

Description

<progress>

Represents the progress of a task

<ruby>

Defines a ruby annotation (for East
Asian typography)

<rt>

Defines an explanation/pronunciation
of characters (for East Asian
typography)

<rp>

Defines what to show in browsers that
do not support ruby annotations

<section>

Defines a section in a document

<time>

Defines a date/time

<wbr>

Defines a possible line-break
Removed Elements
The following HTML 4.01 elements are removed from HTML5:
 <acronym>
 <applet>
 <basefont>
 <big>
 <center>
 <dir>
 <font>
 <frame>
 <frameset>
 <noframes>
 <strike>
 <tt>
HTML5 Canvas
HTML5 Canvas
The HTML5 <canvas> element is used to draw graphics, on the
fly, via scripting (usually JavaScript).
The <canvas> element is only a container for graphics. You
must use a script to actually draw the graphics.
Canvas has several methods for drawing
paths, boxes, circles, text, and adding images.
HTML5 Inline SVG
HTML5 Inline 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
SVG 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)
Difference Between SVG &
Canvas
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
HTML5 Geolocation
HTML5 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.
Information you get from
Geolocation API
Property

Description

coords.latitude

The latitude as a decimal number

coords.longitude

The longitude as a decimal number

coords.accuracy

The accuracy of position

coords.altitude

The altitude in meters above the mean
sea level

coords.altitudeAccuracy

The altitude accuracy of position

coords.heading

The heading as degrees clockwise
from North

coords.speed

The speed in meters per second

timestamp

The date/time of the response
HTML5 Video
HTML5 Video
Many modern websites show videos. HTML5 provides a
standard for showing them.
Video Formats and Browser
Support
Browser

MP4

WebM

Ogg

Internet Explorer

YES

NO

NO

Chrome

YES

YES

YES

Firefox

NO
Update: Firefox 21
running on
Windows 7,
YES
Windows 8,
Windows Vista,
and Android now
supports MP4

YES

Safari

YES

NO

NO

Opera

NO

YES

YES
HTML5 Audio
HTML5 Audio
HTML5 provides a standard for playing audio files.
Audio Formats and Browser
Support
Browser

MP3

Wav

Ogg

Internet Explorer

YES

NO

NO

Chrome

YES

YES

YES

Firefox

NO
Update: Firefox 21
running on
Windows 7,
YES
Windows 8,
Windows Vista,
and Android now
supports MP3

YES

Safari

YES

YES

NO

Opera

NO

YES

YES
HTML5 Input Types
HTML5 Input Types
HTML5 has several new input types for forms. These new features
allow better input control and validation.
 color
 Date
 datetime
 datetime-local
 email
 month
 number
 range
 search
 tel
 time
 url
 week
HTML5 Form
Elements
HTML5 Form Elements
HTML5 has the following new form elements:
<datalist>
<keygen>
<output>
HTML5 <datalist> Element
The <datalist> element specifies a list of pre-defined options for
an <input> element.
The <datalist> element is used to provide an "autocomplete"
feature on <input> elements. Users will see a drop-down list of
pre-defined options as they input data.
Use the <input> element's list attribute to bind it together with
a <datalist> element.
HTML5 <keygen> Element
The purpose of the <keygen> element is to provide a secure
way to authenticate users.
The <keygen> tag specifies a key-pair generator field in a form.
When the form is submitted, two keys are generated, one
private and one public.
The private key is stored locally, and the public key is sent to
the server. The public key could be used to generate a client
certificate to authenticate the user in the future.
HTML5 <output>
Element
HTML5 <output> Element
The <output> element represents the result of a calculation (like
one performed by a script).
HTML5 Semantic
Elements
HTML5 Semantic Elements
A semantic element clearly describes its meaning to both the
browser and the developer.
Examples of non-semantic elements: <div> and <span> - Tells
nothing about its content.
Examples of semantic elements: <form>, <table>, and <img> Clearly defines its content.
HTML5 Semantic Elements
HTML5 offers new semantic elements to clearly define
different parts of a web page:
<header>
<nav>
<section>
<article>
<aside>
<figcaption>
<figure>
<footer>
HTML5 Web Storage
HTML5 Web 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.
HTML5 Web Storage
There are two new objects for storing data on the client:
 localStorage - stores data with no expiration date
 sessionStorage - stores data for one session

The sessionStorage object is equal to the localStorage
object, except that it stores the data for only one session. The
data is deleted when the user closes the browser window.
HTML5 Application
Cache
HTML5 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:
Offline browsing - users can use the application when they're
offline
Speed - cached resources load faster
Reduced server load - the browser will only download
updated/changed resources from the server
HTML5 Cache Manifest
Example
The example below shows an HTML document with a cache
manifest (for offline browsing):
<!DOCTYPE HTML>
<html manifest="demo.appcache">

<body>
The content of the document......
</body>
</html>
Cache Manifest Basics
To enable application cache, include the manifest attribute in
the document's <html> tag.
<!DOCTYPE HTML>
<html manifest="demo.appcache">
...
</html>
Every page with the manifest attribute specified will be cached
when the user visits it. If the manifest attribute is not specified,
the page will not be cached (unless the page is specified directly
in the manifest file).
The recommended file extension for manifest files is:
".appcache”
The Manifest File
The manifest file is a simple text file, which tells the browser
what to cache (and what to never cache).
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
CACHE MANIFEST
The first line, CACHE MANIFEST, is required:
CACHE MANIFEST
/theme.css
/logo.gif
/main.js
The manifest file above lists three resources: a CSS file, a GIF
image, and a JavaScript file. When the manifest file is loaded,
the browser will download the three files from the root
directory of the web site. Then, whenever the user is not
connected to the internet, the resources will still be available.
NETWORK
The NETWORK section below specifies that the file "login.asp"
should never be cached, and will not be available offline.
NETWORK:
login.asp
An asterisk can be used to indicate that all other resources/files
require an internet connection:
NETWORK:
*
FALLBACK
The FALLBACK section below specifies that "offline.html" will be
served in place of all files in the /html/ catalog, in case an
internet connection cannot be established:
FALLBACK:
/html/ /offline.html
Updating the Cache
Once an application is cached, it remains cached until one of the
following happens:
The user clears the browser's cache
The manifest file is modified (see tip below)
The application cache is programmatically updated

More Related Content

What's hot

Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Andres Baravalle
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
Dave Kelly
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
Salman Memon
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 
Html
HtmlHtml
HTML (Web) basics for a beginner
HTML (Web) basics for a beginnerHTML (Web) basics for a beginner
HTML (Web) basics for a beginner
Jayapal Reddy Nimmakayala
 
CSS
CSSCSS
Advanced Cascading Style Sheets
Advanced Cascading Style SheetsAdvanced Cascading Style Sheets
Advanced Cascading Style Sheets
fantasticdigitaltools
 
Bootstrap
BootstrapBootstrap
Bootstrap
Jadson Santos
 
Bootstrap 5 basic
Bootstrap 5 basicBootstrap 5 basic
Bootstrap 5 basic
Jubair Ahmed Junjun
 
HTML5 & CSS3
HTML5 & CSS3 HTML5 & CSS3
HTML5 & CSS3
Ian Lintner
 
Html5 and-css3-overview
Html5 and-css3-overviewHtml5 and-css3-overview
Html5 and-css3-overview
Jacob Nelson
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Seble Nigussie
 
Css Ppt
Css PptCss Ppt
Css Ppt
Hema Prasanth
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
David Lindkvist
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
Walid Ashraf
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
abhilashagupta
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
Niharika Gupta
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
Mai Moustafa
 

What's hot (20)

Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Html
HtmlHtml
Html
 
HTML (Web) basics for a beginner
HTML (Web) basics for a beginnerHTML (Web) basics for a beginner
HTML (Web) basics for a beginner
 
CSS
CSSCSS
CSS
 
Advanced Cascading Style Sheets
Advanced Cascading Style SheetsAdvanced Cascading Style Sheets
Advanced Cascading Style Sheets
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Bootstrap 5 basic
Bootstrap 5 basicBootstrap 5 basic
Bootstrap 5 basic
 
HTML5 & CSS3
HTML5 & CSS3 HTML5 & CSS3
HTML5 & CSS3
 
Html5 and-css3-overview
Html5 and-css3-overviewHtml5 and-css3-overview
Html5 and-css3-overview
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
 

Viewers also liked

HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012
steveheffernan
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video Player
Jim Jeffers
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video Player
Brightcove
 
Use case document for boot fitting form
Use case document for boot fitting formUse case document for boot fitting form
Use case document for boot fitting form
Kalai Vani
 
Video.js - How to build and HTML5 Video Player
Video.js - How to build and HTML5 Video PlayerVideo.js - How to build and HTML5 Video Player
Video.js - How to build and HTML5 Video Player
steveheffernan
 
Making the HTML5 Video element interactive
Making the HTML5 Video element interactiveMaking the HTML5 Video element interactive
Making the HTML5 Video element interactive
Charles Hudson
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
Pradeep Varadaraja Banavara
 
How to Embed a PowerPoint Presentation Using SlideShare
How to Embed a PowerPoint Presentation Using SlideShareHow to Embed a PowerPoint Presentation Using SlideShare
How to Embed a PowerPoint Presentation Using SlideShare
Joie Ocon
 
reveal.js 3.0.0
reveal.js 3.0.0reveal.js 3.0.0
reveal.js 3.0.0
Hakim El Hattab
 
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
Edureka!
 

Viewers also liked (10)

HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video Player
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video Player
 
Use case document for boot fitting form
Use case document for boot fitting formUse case document for boot fitting form
Use case document for boot fitting form
 
Video.js - How to build and HTML5 Video Player
Video.js - How to build and HTML5 Video PlayerVideo.js - How to build and HTML5 Video Player
Video.js - How to build and HTML5 Video Player
 
Making the HTML5 Video element interactive
Making the HTML5 Video element interactiveMaking the HTML5 Video element interactive
Making the HTML5 Video element interactive
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
 
How to Embed a PowerPoint Presentation Using SlideShare
How to Embed a PowerPoint Presentation Using SlideShareHow to Embed a PowerPoint Presentation Using SlideShare
How to Embed a PowerPoint Presentation Using SlideShare
 
reveal.js 3.0.0
reveal.js 3.0.0reveal.js 3.0.0
reveal.js 3.0.0
 
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
 

Similar to Html5 tutorial for beginners

HTML5-Tutorial-For-Beginn.6202488.pptx
HTML5-Tutorial-For-Beginn.6202488.pptxHTML5-Tutorial-For-Beginn.6202488.pptx
HTML5-Tutorial-For-Beginn.6202488.pptx
BCAGen
 
HTML5.pptx
HTML5.pptxHTML5.pptx
HTML5.pptx
BCAGen
 
HTML5 Presentation
HTML5 PresentationHTML5 Presentation
HTML5 Presentation
vs4vijay
 
HTML 5
HTML 5HTML 5
Basics of HTML5 for Phonegap
Basics of HTML5 for PhonegapBasics of HTML5 for Phonegap
Basics of HTML5 for Phonegap
Rakesh Jha
 
Html5
Html5Html5
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
madhavforu
 
IRJET- HTML5 in Web Development: A New Approach
IRJET- HTML5 in Web Development: A New ApproachIRJET- HTML5 in Web Development: A New Approach
IRJET- HTML5 in Web Development: A New Approach
IRJET Journal
 
Html5 Basics
Html5 BasicsHtml5 Basics
Html5 Basics
Pankaj Bajaj
 
Html5
Html5Html5
Html5 CSS3 jQuery Basic
Html5 CSS3 jQuery BasicHtml5 CSS3 jQuery Basic
Html5 CSS3 jQuery Basic
Ravi Yelluripati
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
Ivano Malavolta
 
Html 5
Html 5Html 5
Html 5
Nguyen Quang
 
Introduction of html5
Introduction of html5Introduction of html5
Introduction of html5
kokila T
 
Html5
Html5Html5
Html5
Html5Html5
Dive into HTML5
Dive into HTML5Dive into HTML5
Dive into HTML5
Karthik Nallajalla
 
HTML5 and DHTML
HTML5 and DHTMLHTML5 and DHTML
HTML5 and DHTML
patelpriyank01
 
Html 5
Html 5Html 5
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginners
Vineeth N Krishnan
 

Similar to Html5 tutorial for beginners (20)

HTML5-Tutorial-For-Beginn.6202488.pptx
HTML5-Tutorial-For-Beginn.6202488.pptxHTML5-Tutorial-For-Beginn.6202488.pptx
HTML5-Tutorial-For-Beginn.6202488.pptx
 
HTML5.pptx
HTML5.pptxHTML5.pptx
HTML5.pptx
 
HTML5 Presentation
HTML5 PresentationHTML5 Presentation
HTML5 Presentation
 
HTML 5
HTML 5HTML 5
HTML 5
 
Basics of HTML5 for Phonegap
Basics of HTML5 for PhonegapBasics of HTML5 for Phonegap
Basics of HTML5 for Phonegap
 
Html5
Html5Html5
Html5
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
IRJET- HTML5 in Web Development: A New Approach
IRJET- HTML5 in Web Development: A New ApproachIRJET- HTML5 in Web Development: A New Approach
IRJET- HTML5 in Web Development: A New Approach
 
Html5 Basics
Html5 BasicsHtml5 Basics
Html5 Basics
 
Html5
Html5Html5
Html5
 
Html5 CSS3 jQuery Basic
Html5 CSS3 jQuery BasicHtml5 CSS3 jQuery Basic
Html5 CSS3 jQuery Basic
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
 
Html 5
Html 5Html 5
Html 5
 
Introduction of html5
Introduction of html5Introduction of html5
Introduction of html5
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
Dive into HTML5
Dive into HTML5Dive into HTML5
Dive into HTML5
 
HTML5 and DHTML
HTML5 and DHTMLHTML5 and DHTML
HTML5 and DHTML
 
Html 5
Html 5Html 5
Html 5
 
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginners
 

More from Singsys Pte Ltd

Technical Seminar Series: GIT Pull Requests Best Practices
Technical Seminar Series:  GIT Pull Requests Best PracticesTechnical Seminar Series:  GIT Pull Requests Best Practices
Technical Seminar Series: GIT Pull Requests Best Practices
Singsys Pte Ltd
 
Laravel Security Standards
Laravel Security Standards Laravel Security Standards
Laravel Security Standards
Singsys Pte Ltd
 
Android OS - The Journey of most popular Operating System
Android OS - The Journey of most popular Operating SystemAndroid OS - The Journey of most popular Operating System
Android OS - The Journey of most popular Operating System
Singsys Pte Ltd
 
How to do Memory Optimizations in Android
How to do Memory Optimizations in AndroidHow to do Memory Optimizations in Android
How to do Memory Optimizations in Android
Singsys Pte Ltd
 
iOS Application Battery Optimization Techniques
iOS Application Battery Optimization TechniquesiOS Application Battery Optimization Techniques
iOS Application Battery Optimization Techniques
Singsys Pte Ltd
 
Android Battery optimization Android Apps
Android Battery optimization Android AppsAndroid Battery optimization Android Apps
Android Battery optimization Android Apps
Singsys Pte Ltd
 
How to Create WordPress Website in Easy Steps
How to Create WordPress Website in Easy StepsHow to Create WordPress Website in Easy Steps
How to Create WordPress Website in Easy Steps
Singsys Pte Ltd
 
Basics of-linux
Basics of-linuxBasics of-linux
Basics of-linux
Singsys Pte Ltd
 
SoLoMo
SoLoMoSoLoMo
Introduction to facebook sdk
Introduction to facebook sdkIntroduction to facebook sdk
Introduction to facebook sdk
Singsys Pte Ltd
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
Singsys Pte Ltd
 
Joomla 3 installation and management guide
Joomla 3 installation and management guideJoomla 3 installation and management guide
Joomla 3 installation and management guide
Singsys Pte Ltd
 
Joomla Introduction & Installation Tutorial
Joomla Introduction & Installation TutorialJoomla Introduction & Installation Tutorial
Joomla Introduction & Installation Tutorial
Singsys Pte Ltd
 
Basic of web design
Basic of web designBasic of web design
Basic of web design
Singsys Pte Ltd
 
Embedded Technology
Embedded TechnologyEmbedded Technology
Embedded Technology
Singsys Pte Ltd
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
Singsys Pte Ltd
 
Technical seo tips for web developers
Technical seo tips for web developersTechnical seo tips for web developers
Technical seo tips for web developers
Singsys Pte Ltd
 
WordPress Website Design and Development
WordPress Website Design and DevelopmentWordPress Website Design and Development
WordPress Website Design and Development
Singsys Pte Ltd
 
Being a designer
Being a designerBeing a designer
Being a designer
Singsys Pte Ltd
 
Points for Design and Development of SEO friendly websites
Points for Design and Development of SEO friendly websitesPoints for Design and Development of SEO friendly websites
Points for Design and Development of SEO friendly websites
Singsys Pte Ltd
 

More from Singsys Pte Ltd (20)

Technical Seminar Series: GIT Pull Requests Best Practices
Technical Seminar Series:  GIT Pull Requests Best PracticesTechnical Seminar Series:  GIT Pull Requests Best Practices
Technical Seminar Series: GIT Pull Requests Best Practices
 
Laravel Security Standards
Laravel Security Standards Laravel Security Standards
Laravel Security Standards
 
Android OS - The Journey of most popular Operating System
Android OS - The Journey of most popular Operating SystemAndroid OS - The Journey of most popular Operating System
Android OS - The Journey of most popular Operating System
 
How to do Memory Optimizations in Android
How to do Memory Optimizations in AndroidHow to do Memory Optimizations in Android
How to do Memory Optimizations in Android
 
iOS Application Battery Optimization Techniques
iOS Application Battery Optimization TechniquesiOS Application Battery Optimization Techniques
iOS Application Battery Optimization Techniques
 
Android Battery optimization Android Apps
Android Battery optimization Android AppsAndroid Battery optimization Android Apps
Android Battery optimization Android Apps
 
How to Create WordPress Website in Easy Steps
How to Create WordPress Website in Easy StepsHow to Create WordPress Website in Easy Steps
How to Create WordPress Website in Easy Steps
 
Basics of-linux
Basics of-linuxBasics of-linux
Basics of-linux
 
SoLoMo
SoLoMoSoLoMo
SoLoMo
 
Introduction to facebook sdk
Introduction to facebook sdkIntroduction to facebook sdk
Introduction to facebook sdk
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Joomla 3 installation and management guide
Joomla 3 installation and management guideJoomla 3 installation and management guide
Joomla 3 installation and management guide
 
Joomla Introduction & Installation Tutorial
Joomla Introduction & Installation TutorialJoomla Introduction & Installation Tutorial
Joomla Introduction & Installation Tutorial
 
Basic of web design
Basic of web designBasic of web design
Basic of web design
 
Embedded Technology
Embedded TechnologyEmbedded Technology
Embedded Technology
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
 
Technical seo tips for web developers
Technical seo tips for web developersTechnical seo tips for web developers
Technical seo tips for web developers
 
WordPress Website Design and Development
WordPress Website Design and DevelopmentWordPress Website Design and Development
WordPress Website Design and Development
 
Being a designer
Being a designerBeing a designer
Being a designer
 
Points for Design and Development of SEO friendly websites
Points for Design and Development of SEO friendly websitesPoints for Design and Development of SEO friendly websites
Points for Design and Development of SEO friendly websites
 

Recently uploaded

Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
ScyllaDB
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time MLMongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
ScyllaDB
 
Day 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data ManipulationDay 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data Manipulation
UiPathCommunity
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
AlexanderRichford
 
ScyllaDB Leaps Forward with Dor Laor, CEO of ScyllaDB
ScyllaDB Leaps Forward with Dor Laor, CEO of ScyllaDBScyllaDB Leaps Forward with Dor Laor, CEO of ScyllaDB
ScyllaDB Leaps Forward with Dor Laor, CEO of ScyllaDB
ScyllaDB
 
Multivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back againMultivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back again
Kieran Kunhya
 
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google CloudRadically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
ScyllaDB
 
Introduction to ThousandEyes AMER Webinar
Introduction  to ThousandEyes AMER WebinarIntroduction  to ThousandEyes AMER Webinar
Introduction to ThousandEyes AMER Webinar
ThousandEyes
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024
ThousandEyes
 
Facilitation Skills - When to Use and Why.pptx
Facilitation Skills - When to Use and Why.pptxFacilitation Skills - When to Use and Why.pptx
Facilitation Skills - When to Use and Why.pptx
Knoldus Inc.
 
CTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database MigrationCTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database Migration
ScyllaDB
 
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to SuccessMongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
ScyllaDB
 
intra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_Enintra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_En
NTTDATA INTRAMART
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
leebarnesutopia
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 

Recently uploaded (20)

Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time MLMongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
 
Day 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data ManipulationDay 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data Manipulation
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
 
ScyllaDB Leaps Forward with Dor Laor, CEO of ScyllaDB
ScyllaDB Leaps Forward with Dor Laor, CEO of ScyllaDBScyllaDB Leaps Forward with Dor Laor, CEO of ScyllaDB
ScyllaDB Leaps Forward with Dor Laor, CEO of ScyllaDB
 
Multivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back againMultivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back again
 
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google CloudRadically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
 
Introduction to ThousandEyes AMER Webinar
Introduction  to ThousandEyes AMER WebinarIntroduction  to ThousandEyes AMER Webinar
Introduction to ThousandEyes AMER Webinar
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024
 
Facilitation Skills - When to Use and Why.pptx
Facilitation Skills - When to Use and Why.pptxFacilitation Skills - When to Use and Why.pptx
Facilitation Skills - When to Use and Why.pptx
 
CTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database MigrationCTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database Migration
 
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to SuccessMongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
 
intra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_Enintra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_En
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 

Html5 tutorial for beginners

  • 3. What is HTML5? HTML5 is the new standard for HTML. The previous version of HTML was – HTML 4.01, came in 1999. HTML5 is designed to deliver almost everything you want to do online without requiring additional plugins. It does everything from animation to apps, music to movies, and can also be used to build complicated applications that run in your browser. HTML5 is also cross-platform (it does not care whether you are using a tablet or a smartphone, a notebook, notebook or a Smart TV).
  • 5. Differences Between HTML4 & HTML5 1. 2. 3. 4. 5. 6. 7. 8. 9. HTML5 is a work in progress Simplified Syntax The New <canvas> Element for 2D drawings New content-specific elements, like <article>, <header>, <footer>, <nav>, <section> New <menu> and <figure> Elements New <audio> and <video> Elements New form controls, like calendar, date, time, email, url, search No More <frame>, <center>, <big>, and <b>, <font> Support for local storage
  • 7. Browser Support for HTML5 HTML5 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.
  • 9. The HTML5 <!DOCTYPE> In HTML5 there is only one <!doctype> declaration, and it is very simple: <!DOCTYPE html>
  • 10. Minimum HTML5 Document Below is a simple HTML5 document, with the minimum of required tags: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> </head> <body> Content of the document...... </body> </html>
  • 12. The New <canvas> Element The <canvas> element is used to draw graphics, on the fly, via scripting (usually JavaScript).
  • 13. New Media Elements Tag Description <audio> Defines sound content <video> Defines a video or movie <source> Defines multiple media resources for <video> and <audio> <embed> Defines a container for an external application or interactive content (a plug-in) <track> Defines text tracks for <video> and <audio>
  • 14. New Form Elements Tag Description <datalist> Specifies a list of pre-defined option for input controls <keygen> Defines a key-pair generator field (for forms) <output> Defines the result of a calculation
  • 15. New Semantic/Structural Elements Tag Description <article> Defines an article <aside> Defines content aside from the page content <bdi> Isolates a part of text that might be formatted in a different direction from other text outside it <command> Defines a command button that a user can invoke <details> Defines additional details that the user can view or hide <dialog> Defines a dialog box or window <summary> Defines a visible heading for a <details> element
  • 16. New Semantic/Structural Elements Tag Description <figure> Specifies self-contained content, like illustrations, diagrams, photos, code listings, etc. <figcaption> Defines a caption for a <figure> element <footer> Defines a footer for a document or section <header> Defines a header for a document or section <mark> Defines marked/highlighted text <meter> Defines a scalar measurement within a known range (a gauge) <nav> Defines navigation links
  • 17. New Semantic/Structural Elements Tag Description <progress> Represents the progress of a task <ruby> Defines a ruby annotation (for East Asian typography) <rt> Defines an explanation/pronunciation of characters (for East Asian typography) <rp> Defines what to show in browsers that do not support ruby annotations <section> Defines a section in a document <time> Defines a date/time <wbr> Defines a possible line-break
  • 18. Removed Elements The following HTML 4.01 elements are removed from HTML5:  <acronym>  <applet>  <basefont>  <big>  <center>  <dir>  <font>  <frame>  <frameset>  <noframes>  <strike>  <tt>
  • 20. HTML5 Canvas The HTML5 <canvas> element is used to draw graphics, on the fly, via scripting (usually JavaScript). The <canvas> element is only a container for graphics. You must use a script to actually draw the graphics. Canvas has several methods for drawing paths, boxes, circles, text, and adding images.
  • 22. HTML5 Inline 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
  • 23. SVG 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)
  • 24. Difference Between SVG & Canvas 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
  • 26. HTML5 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.
  • 27. Information you get from Geolocation API Property Description coords.latitude The latitude as a decimal number coords.longitude The longitude as a decimal number coords.accuracy The accuracy of position coords.altitude The altitude in meters above the mean sea level coords.altitudeAccuracy The altitude accuracy of position coords.heading The heading as degrees clockwise from North coords.speed The speed in meters per second timestamp The date/time of the response
  • 29. HTML5 Video Many modern websites show videos. HTML5 provides a standard for showing them.
  • 30. Video Formats and Browser Support Browser MP4 WebM Ogg Internet Explorer YES NO NO Chrome YES YES YES Firefox NO Update: Firefox 21 running on Windows 7, YES Windows 8, Windows Vista, and Android now supports MP4 YES Safari YES NO NO Opera NO YES YES
  • 32. HTML5 Audio HTML5 provides a standard for playing audio files.
  • 33. Audio Formats and Browser Support Browser MP3 Wav Ogg Internet Explorer YES NO NO Chrome YES YES YES Firefox NO Update: Firefox 21 running on Windows 7, YES Windows 8, Windows Vista, and Android now supports MP3 YES Safari YES YES NO Opera NO YES YES
  • 35. HTML5 Input Types HTML5 has several new input types for forms. These new features allow better input control and validation.  color  Date  datetime  datetime-local  email  month  number  range  search  tel  time  url  week
  • 37. HTML5 Form Elements HTML5 has the following new form elements: <datalist> <keygen> <output>
  • 38. HTML5 <datalist> Element The <datalist> element specifies a list of pre-defined options for an <input> element. The <datalist> element is used to provide an "autocomplete" feature on <input> elements. Users will see a drop-down list of pre-defined options as they input data. Use the <input> element's list attribute to bind it together with a <datalist> element.
  • 39. HTML5 <keygen> Element The purpose of the <keygen> element is to provide a secure way to authenticate users. The <keygen> tag specifies a key-pair generator field in a form. When the form is submitted, two keys are generated, one private and one public. The private key is stored locally, and the public key is sent to the server. The public key could be used to generate a client certificate to authenticate the user in the future.
  • 41. HTML5 <output> Element The <output> element represents the result of a calculation (like one performed by a script).
  • 43. HTML5 Semantic Elements A semantic element clearly describes its meaning to both the browser and the developer. Examples of non-semantic elements: <div> and <span> - Tells nothing about its content. Examples of semantic elements: <form>, <table>, and <img> Clearly defines its content.
  • 44. HTML5 Semantic Elements HTML5 offers new semantic elements to clearly define different parts of a web page: <header> <nav> <section> <article> <aside> <figcaption> <figure> <footer>
  • 46. HTML5 Web 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.
  • 47. HTML5 Web Storage There are two new objects for storing data on the client:  localStorage - stores data with no expiration date  sessionStorage - stores data for one session The sessionStorage object is equal to the localStorage object, except that it stores the data for only one session. The data is deleted when the user closes the browser window.
  • 49. HTML5 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: Offline browsing - users can use the application when they're offline Speed - cached resources load faster Reduced server load - the browser will only download updated/changed resources from the server
  • 50. HTML5 Cache Manifest Example The example below shows an HTML document with a cache manifest (for offline browsing): <!DOCTYPE HTML> <html manifest="demo.appcache"> <body> The content of the document...... </body> </html>
  • 51. Cache Manifest Basics To enable application cache, include the manifest attribute in the document's <html> tag. <!DOCTYPE HTML> <html manifest="demo.appcache"> ... </html> Every page with the manifest attribute specified will be cached when the user visits it. If the manifest attribute is not specified, the page will not be cached (unless the page is specified directly in the manifest file). The recommended file extension for manifest files is: ".appcache”
  • 52. The Manifest File The manifest file is a simple text file, which tells the browser what to cache (and what to never cache). 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
  • 53. CACHE MANIFEST The first line, CACHE MANIFEST, is required: CACHE MANIFEST /theme.css /logo.gif /main.js The manifest file above lists three resources: a CSS file, a GIF image, and a JavaScript file. When the manifest file is loaded, the browser will download the three files from the root directory of the web site. Then, whenever the user is not connected to the internet, the resources will still be available.
  • 54. NETWORK The NETWORK section below specifies that the file "login.asp" should never be cached, and will not be available offline. NETWORK: login.asp An asterisk can be used to indicate that all other resources/files require an internet connection: NETWORK: *
  • 55. FALLBACK The FALLBACK section below specifies that "offline.html" will be served in place of all files in the /html/ catalog, in case an internet connection cannot be established: FALLBACK: /html/ /offline.html
  • 56. Updating the Cache Once an application is cached, it remains cached until one of the following happens: The user clears the browser's cache The manifest file is modified (see tip below) The application cache is programmatically updated

Editor's Notes

  1. Myself GauravJaiswal, I am here to represent my company Singsys Pte. Ltd.Today I am going to present my presentation entitled SoLoMo: 3 important ingredients for any mobile application.
  2. A manifest file needs to be served with the correct MIME-type, which is &quot;text/cache-manifest&quot;. Must be configured on the web server.
  3. Lines starting with a &quot;#&quot; are comment lines, but can also serve another purpose. An application&apos;s cache is only updated when its manifest file changes. If you edit an image or change a JavaScript function, those changes will not be re-cached. Updating the date and version in a comment line is one way to make the browser re-cache your files.
  翻译: