SlideShare une entreprise Scribd logo
1  sur  66
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
HTML5 Tutorial
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
HTML5 Tutorial
KeyPoints to develop in your own time!
Introductory concepts in HTML5 @ OxfordCambridge.Org all for free and free for all.
The information gathered here are under the format of KeyPoints for readers to develop in their own
time. Some tips on how to proceed, perhaps:
- Identify all the Keypoints on which you feel a need to expand your knowledge.
- Choose a good book or two or info from Internet and then work towards gaining the needed knowledge.
Please Enjoy!
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
To introduce the reader or the learner to
the next generation of HTML: HTML5.
Aim of publication
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
After developing the KeyPoints outlined in this publication, you should
mainly be able:
☺ To comprehend the new features in HTML5.
☺ Comprehend some of the most interesting new features in HTML5.
☺ Explore some of the most interesting new features of HTML5.
Learning Objectives
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
☺ (Section 1) HTML5 Introduction
☺ (Section 2) HTML5 New Elements
☺ (Section 3) HTML5 Video
☺ (Section 4) HTML5 Audio
☺ (Section 5) HTML5 Canvas
☺ (Section 6) HTML5 Web Storage
HTML5 Tutorial - Sections List
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 1) HTML5 Introduction – Summary
☺ HTML5 will be the new standard for HTML,
XHTML, and the HTML DOM.
☺ The previous version of HTML came in 1999.
☺ The web has changed a lot since then.
☺ HTML5 is still a work in progress.
☺ However, most modern browsers have some
HTML5 support.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 1) HTML5 Introduction – HighPoints
☺ How Did HTML5 Get Started?
☺ New Features
☺ Browser Support
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 1) HighPoints – How Did HTML5 Get Started?
☺ HTML5 is a cooperation between the World
Wide Web Consortium (W3C) and the Web
Hypertext Application Technology Working
Group (WHATWG).
☺ WHATWG was working with web forms and
applications, and W3C was working with XHTML
2.0.
☺ In 2006, they decided to cooperate and create
a new version of HTML.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 1) HighPoints – How Did HTML5 Get Started?
☺ Some rules for HTML5 were established:
☺ * New features should be based on HTML, CSS,
DOM, and JavaScript
☺ * Reduce the need for external plugins (like
Flash)
☺ * Better error handling
☺ * More markup to replace scripting
☺ * HTML5 should be device independent
☺ * The development process should be visible to
the public.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 1) HighPoints – New Features.
☺ Some of the most interesting new features
in HTML5:
☺ * The canvas element for drawing
☺ * The video and audio elements for media
playback
☺ * Better support for local offline storage
☺ * New content specific elements, like article,
footer, header, nav, section
☺ * New form controls, like calendar, date, time,
email, url, search
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 1) HighPoints – Browser Support.
☺ 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.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HTML5 New Elements – Summary
☺ New elements for better structure.
☺ HTML5 provides a new standard for media
content.
☺ The canvas element uses JavaScript to make
drawings on a web page.
☺ HTML5 offers more form elements, with more
functionality.
☺ lso, the input element's type attribute has
many new values, for better input control
before sending it to the server.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HTML5 New Elements – HighPoints
☺ New Elements in HTML5
☺ New Markup Elements
☺ New Media Elements
☺ The Canvas Element
☺ New Form Elements
☺ New Input Type Attribute Values
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – New Elements in HTML5
☺ The 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 deleted or re-written in
HTML5.
☺ To better handle today's internet use, HTML5
also includes new elements for better
structure, drawing, media content, and better
form handling.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – New Markup Elements
☺ <Tag> Description
☺ <article> For external content, like text from a
news-article, blog, forum, or any other content
from an external source
☺ <aside> For content aside from the content it
is placed in. The aside content should be
related to the surrounding content
☺ <command> A button, or a radiobutton, or a
checkbox
☺ <details> For describing details about a
document, or parts of a document
☺ <summary> A caption, or summary, inside the
details element
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – New Markup Elements
☺ <Tag> Description
☺ <figure> For grouping a section of stand-alone
content, could be a video.
☺ <figcaption> The caption of the figure section.
☺ <footer> For a footer of a document or section,
could include the name of the author, the date
of the document, contact information, or
copyright information.
☺ <header> For an introduction of a document or
section, could include navigation.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – New Markup Elements
☺ <hgroup> For a section of headings, using <h1>
to <h6>, where the largest is the main heading
of the section, and the others are sub-
headings.
☺ <mark> For text that should be highlighted.
☺ <meter> For a measurement, used only if the
maximum and minimum values are known.
☺ <nav> For a section of navigation
☺ <progress> The state of a work in progress
☺ <ruby> For ruby annotation (Chinese notes or
characters)
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – New Markup Elements
☺ <Tag> Description
☺ <rt> For explanation of the ruby annotation
☺ <rp> What to show browsers that do not
support the ruby element
☺ <section> For a section in a document. Such as
chapters, headers, footers, or any other
sections of the document
☺ <time> For defining a time or a date, or both
☺ <wbr> Word break. For defining a line-break
opportunity.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – New Media Elements
☺ HTML5 provides a new standard for media
content:
☺ <Tag> Description
☺ <audio> 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.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – The Canvas Element
☺ The canvas element uses JavaScript to make
drawings on a web page.
☺ <Tag> Description
☺ <canvas> For making graphics with a script.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – The Canvas Element
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – New Form Elements
☺ HTML5 offers more form elements, with more
functionality:
☺ <Tag> Description
☺ <datalist> A list of options for input values
☺ <keygen> Generate keys to authenticate users
☺ <output> For different types of output, such as
output written by a script.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – New Input Type Attribute Values
☺ The input element's type attribute has many
new values, for better input control before
sending it to the server:
☺ <Tag> Description
☺ tel The input value is of type telephone number
☺ Search The input field is a search field
☺ url The input value is a URL
☺ email The input value is one or more email
addresses
☺ datetime The input value is a date and/or time
☺ date The input value is a date
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 2) HighPoints – New Input Type Attribute Values
☺ <Tag> Description
☺ month The input value is a month
☺ week The input value is a week
☺ time The input value is of type time
☺ datetime-local The input value is a local
date/time
☺ number The input value is a number
☺ range The input value is a number in a given
range
☺ color The input value is a hexadecimal color,
like #FF8800.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 3) HTML5 Video – Summary.
☺ Many modern websites shows videos. HTML5
provides a standard for showing them.
☺ Until now, there has never been a standard for
showing video on a web page.
☺ Currently, with HTML5, there are 3 supported
video formats for the video element.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 3) HTML5 Video – HighPoints
☺ Video on the Web
☺ Video Formats
☺ How It Works
☺ All <video> Attributes
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 3) HighPoints – Video on the Web
☺ Until now, there has never been a standard for
showing video on a web page.
☺ Today, most videos are shown through a plugin
(like flash).
☺ However, not all browsers have the same
plugins.
☺ HTML5 specifies a standard way to include
video, with the video element.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 3) HighPoints – Video Formats
☺ Ogg = Ogg files with Theora video codec and
Vorbis audio codec.
☺ MPEG4 = MPEG 4 files with H.264 video codec
and AAC audio codec.
☺ WebM = WebM files with VP8 video codec and
Vorbis audio codec.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 3) HighPoints – Video Formats: How It Works
☺ To show a video in HTML5, this is all you need:
<video src="movie.ogg" controls="controls">
</video>
☺ The control attribute is for adding play, pause,
and volume controls.
☺ It is also always a good idea to include the
width and height attributes.
☺ Insert content between the <video> and
</video> tags for browsers that do not support
the video element:
☺ Example:
☺ <video src="movie.ogg" width="320"
height="240" controls="controls">Your
browser does not support the video
tag.</video>
☺ The example above uses an Ogg file, and will
work in Firefox, Opera and Chrome.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 3) HighPoints – Video Formats: How It Works
☺ To make the video work in Internet Explorer,
Safari and future versions of Chrome, we must
add a MPEG4 and WebM file.
☺ The video element allows multiple source
elements.
☺ Source elements can link to different video
files.
☺ The browser will use the first recognized
format:
☺ Example:
☺ <video width="320" height="240"
controls="controls"> <source src="movie.ogg"
type="video/ogg" /> <source src="movie.mp4"
type="video/mp4" /> <source
src="movie.webm" type="video/webm" />
Your browser does not support the video tag.
</video>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 3) HighPoints – All <video> Attributes
☺ Attribute Value Description
☺ audio muted Defining the default state of
the the audio. Currently, only "muted" is
allowed
☺ autoplay autoplay If present, then the video
will start playing as soon as it is ready
☺ controls controls If present, controls will be
displayed, such as a play button
☺ height pixels Sets the height of the video
player
☺ loop loop If present, the video will start over
again, every time it is finished
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 3) HighPoints – All <video> Attributes
☺ Attribute Value Description
☺ poster url Specifies the URL of an image
representing the video
☺ preload preload If present, the video will be
loaded at page load, and ready to run. Ignored
if "autoplay" is present
☺ src url The URL of the video to play
☺ width pixels Sets the width of the video
player.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 4) HTML5 Audio – Summary
☺ HTML5 provides a standard for playing audio.
☺ Until now, there has never been a standard for
playing audio on a web page.
☺ Currently, there are 3 supported formats for
the audio element in HTML5.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 4) HTML5 Audio – HighPoints.
☺ Audio on the Web
☺ Audio Formats
☺ How It Works
☺ All <audio> Attributes
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 4) HighPoints – Audio on the Web
☺ Until now, there has never been a standard for
playing audio on a web page.
☺ Today, most audio are played through a plugin
(like flash).
☺ However, not all browsers have the same
plugins.
☺ HTML5 specifies a standard way to include
audio, with the audio element.
☺ The audio element can play sound files, or an
audio stream.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 4) HighPoints – Audio Formats
☺ Currently, there are 3 supported formats for
the audio element:
☺ Ogg Vorbis
☺ MP3
☺ Wav
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 4) HighPoints – Audio Formats: How It Works
☺ To play an audio file in HTML5, this is all you
need:
☺ <audio src="song.ogg" controls="controls">
</audio>
☺ The control attribute is for adding play, pause,
and volume controls.
☺ Insert content between the <audio> and
</audio> tags for browsers that do not support
the audio element:
☺ Example:
☺ <audio src="song.ogg" controls="controls">
Your browser does not support the audio
element. </audio>
☺ The example above uses an Ogg file, and will
work in Firefox, Opera and Chrome.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 4) HighPoints – Audio Formats: How It Works
☺ To make the audio work in Internet Explorer
and Safari, add an audio file of the type MP3.
☺ The audio element allows multiple source
elements.
☺ Source elements can link to different audio
files.
☺ The browser will use the first recognized
format:
☺ Example:
☺ <audio controls="controls"> <source
src="song.ogg" type="audio/ogg" /> <source
src="song.mp3" type="audio/mpeg" /> Your
browser does not support the audio element.
</audio>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 4) HighPoints – All <audio> Attributes
☺ attribute Value Description
☺ autoplay autoplay Specifies that the audio
will start playing as soon as it is ready.
☺ controls controls Specifies that
controls will be displayed, such as a play button.
☺ loop loop Specifies that the audio will start
playing again (looping) when it reaches the end
☺ preload preload Specifies that the audio will
be loaded at page load, and ready to run.
Ignored if autoplay is present.
☺ src url Specifies the URL of the audio to
play.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HTML5 Canvas – Summary.
☺ The canvas element is used to draw graphics on
a web page.
☺ The HTML5 canvas element uses JavaScript to
draw graphics on a web page.
☺ The canvas element has no drawing abilities of
its own.
☺ All drawing must be done inside a JavaScript.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HTML5 Canvas – HighPoints.
☺ What is Canvas?
☺ Create a Canvas Element
☺ Draw With JavaScript
☺ Understanding Coordinates
☺ More Canvas Examples
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – What is Canvas?
☺ The HTML5 canvas element uses JavaScript to
draw graphics on a web page.
☺ A canvas is a rectangular area, and you control
every pixel of it.
☺ The canvas element has several methods for
drawing paths, boxes, circles, characters, and
adding images.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – Create a Canvas Element
☺ Add a canvas element to the HTML5 page.
☺ Specify the id, width, and height of the
element:
☺ <canvas id="myCanvas" width="200"
height="100"></canvas>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – Draw With JavaScript
☺ The canvas element has no drawing abilities of
its own. All drawing must be done inside a
JavaScript:
☺ Example:
☺ <script type="text/javascript"> var
c=document.getElementById("myCanvas"); var
cxt=c.getContext("2d");
cxt.fillStyle="#FF0000";cxt.fillRect(0,0,150
,75); </script>
☺ JavaScript uses the id to find the canvas
element:
☺ var c=document.getElementById("myCanvas");
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – Draw With JavaScript
☺ Then, create a context object:
☺ var cxt=c.getContext("2d");
☺ The getContext("2d") object is a built-in
HTML5 object, with many methods to draw
paths, boxes, circles, characters, images and
more.
☺ The next two lines draws a red rectangle:
☺ cxt.fillStyle="#FF0000";
cxt.fillRect(0,0,150,75);
☺ The fillStyle method makes it red, and the
fillRect method specifies the shape, position,
and size.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – Understanding Coordinates
☺ The fillRect method above had the parameters
(0,0,150,75).
☺ This means: Draw a 150x75 rectangle on the
canvas, starting at the top left corner (0,0).
☺ The canvas' X and Y coordinates are used to
position drawings on the canvas.
☺ Mouse over the rectangle below to see the
coordinates:.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – More Canvas Examples
☺ These are more examples of drawing on the
canvas element:
☺ Example – Line: Draw a line by specifying where
to start, and where to stop
☺ Example – Circle: Draw a circle by specifying
the size, color, and position
☺ Example – Gradient: Draw a gradient
background with the colors you specify
☺ Example – Image: Put an image on the canvas
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – More Canvas Examples: Line
☺ Example – Line: Draw a line by specifying where
to start, and where to stop
☺ <!DOCTYPE HTML>
☺ <html>
☺ <body>
☺ <canvas id="myCanvas" width="200"
height="100" style="border:1px solid
#c3c3c3;">
☺ Your browser does not support the canvas
element.
☺ </canvas>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – More Canvas Examples: Line
☺ <script type="text/javascript">
☺ var c=document.getElementById("myCanvas");
☺ var cxt=c.getContext("2d");
☺ cxt.moveTo(10,10);
☺ cxt.lineTo(150,50);
☺ cxt.lineTo(10,50);
☺ cxt.stroke();
☺ </script>
☺ </body>
☺ </html>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – More Canvas Examples: Circle
☺ Example – Circle: Draw a circle by specifying
the size, color, and position
☺ <!DOCTYPE HTML>
☺ <html>
☺ <body>
☺ <canvas id="myCanvas" width="200"
height="100" style="border:1px solid
#c3c3c3;">
☺ Your browser does not support the canvas
element.
☺ </canvas>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – More Canvas Examples: Circle
☺ <script type="text/javascript">
☺ var c=document.getElementById("myCanvas");
☺ var cxt=c.getContext("2d");
☺ cxt.fillStyle="#FF0000";
☺ cxt.beginPath();
☺ cxt.arc(70,18,15,0,Math.PI*2,true);
☺ cxt.closePath();
☺ cxt.fill();
☺ </script>
☺ </body>
☺ </html>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – More Canvas Examples: Gradient
☺ Example – Gradient: Draw a gradient
background with the colors you specify
☺ <!DOCTYPE HTML>
☺ <html>
☺ <body>
☺ <canvas id="myCanvas" width="200"
height="100" style="border:1px solid
#c3c3c3;">
☺ Your browser does not support the canvas
element.
☺ </canvas>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – More Canvas Examples: Gradient
☺ <script type="text/javascript">
☺ var c=document.getElementById("myCanvas");
☺ var cxt=c.getContext("2d");
☺ var
grd=cxt.createLinearGradient(0,0,175,50);
☺ grd.addColorStop(0,"#FF0000");
☺ grd.addColorStop(1,"#00FF00");
☺ cxt.fillStyle=grd;
☺ cxt.fillRect(0,0,175,50);
☺ </script>
☺ </body>
☺ </html>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – More Canvas Examples: Image
☺ Example – Image: Put an image on the canvas
☺ <!DOCTYPE HTML>
☺ <html>
☺ <body>
☺ <canvas id="myCanvas" width="200"
height="100" style="border:1px solid
#c3c3c3;">
☺ Your browser does not support the canvas
element.
☺ </canvas>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 5) HighPoints – More Canvas Examples: Image
☺ <script type="text/javascript">
☺ var c=document.getElementById("myCanvas");
☺ var cxt=c.getContext("2d");
☺ var img=new Image();
☺ img.src="img_flwr.png";
☺ cxt.drawImage(img,0,0);
☺ </script>
☺ </body>
☺ </html>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 6) HTML5 Web Storage – Summary
☺ HTML5 offers two new objects for storing
data on the client.
☺ The localStorage object stores the data with
no time limit.
☺ The sessionStorage object stores the data for
one session.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 6) HTML5 Web Storage – HighPoints.
☺ Storing Data on the Client
☺ The localStorage Object
☺ The sessionStorage Object
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 6) HighPoints – Storing Data on the Client
☺ HTML5 offers two new objects for storing
data on the client:
☺ localStorage - stores data with no time limit
☺ sessionStorage - stores data for one session
☺ Earlier, this was done with cookies. Cookies are
not suitable for large amounts of data, because
they are passed on by EVERY request to the
server, making it very slow and in-effective.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 6) HighPoints – Storing Data on the Client
☺ In HTML5, the data is NOT passed on by every
server request, but used ONLY when asked for.
☺ It is possible to store large amounts of data
without affecting the website's performance.
☺ The data is stored in different areas for
different websites, and a website can only
access data stored by itself.
☺ HTML5 uses JavaScript to store and access
the data.
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 6) HighPoints – The localStorage Object
☺ The localStorage object stores the data with
no time limit.
☺ The data will be available the next day, week, or
year.
☺ To create and access a localStorage:
☺ Example:
☺ <script type="text/javascript">
☺ localStorage.lastname="Smith";
☺ document.write(localStorage.lastname);
☺ </script>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 6) HighPoints – The localStorage Object
☺ The following example counts the number of
times a user has visited a page:
☺ <script type="text/javascript">
☺ if (localStorage.pagecount)
☺ {
☺ localStorage.pagecount=Number(localStorage.
pagecount) +1;
☺ }
☺ else
☺ {
☺ localStorage.pagecount=1;
☺ }
☺ document.write("Visits "+
localStorage.pagecount + " time(s).");
☺ </script>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 6) HighPoints – The sessionStorage Object
☺ The sessionStorage object stores the data for
one session.
☺ The data is deleted when the user closes the
browser window.
☺ How to create and access a sessionStorage:
☺ Example:
☺ <script type="text/javascript">
☺ sessionStorage.lastname="Smith";
☺ document.write(sessionStorage.lastname);
☺ </script>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
(Section 6) HighPoints – The sessionStorage Object
☺ The following example counts the number of times a
user has visited a page, in the current session:
☺ <script type="text/javascript">
☺ if (sessionStorage.pagecount)
☺ {
☺ sessionStorage.pagecount=Number(sessionStorage.pag
ecount) +1;
☺ }
☺ else
☺ {
☺ sessionStorage.pagecount=1;
☺ }
☺ document.write("Visits "+sessionStorage.pagecount+"
time(s) this session.");
☺ </script>
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
HTML5 Tutorial – Conclusion.
☺ At this point you should be able to be familiar
with the following:
• Understand that HTML5 is the new
standard for HTML
• But that HTML5 is still a work in progress
• Comprehend its new features
• Explore some of the most interesting new
features of HTML5
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology

Contenu connexe

En vedette

En vedette (9)

Introduction of ram ddr3
Introduction of ram ddr3Introduction of ram ddr3
Introduction of ram ddr3
 
Ray tracing
Ray tracingRay tracing
Ray tracing
 
Ray tracing
Ray tracingRay tracing
Ray tracing
 
viewing3d pipeline
viewing3d pipelineviewing3d pipeline
viewing3d pipeline
 
Ray tracing
 Ray tracing Ray tracing
Ray tracing
 
Oblique parallel projection
Oblique parallel projectionOblique parallel projection
Oblique parallel projection
 
Oblique drawing
Oblique drawingOblique drawing
Oblique drawing
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer Graphics
 
Orthographic Projection
Orthographic ProjectionOrthographic Projection
Orthographic Projection
 

Similaire à HTML5 Tutorial Sections (20)

Kick start @ html5
Kick start @ html5Kick start @ html5
Kick start @ html5
 
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
 
Basics of HTML5 for Phonegap
Basics of HTML5 for PhonegapBasics of HTML5 for Phonegap
Basics of HTML5 for Phonegap
 
Html5
Html5Html5
Html5
 
gdsc-html-ppt.pptx
gdsc-html-ppt.pptxgdsc-html-ppt.pptx
gdsc-html-ppt.pptx
 
HTML5
HTML5HTML5
HTML5
 
Getting started with html5
Getting started with html5Getting started with html5
Getting started with html5
 
Meta tag creation
Meta tag creationMeta tag creation
Meta tag creation
 
HTML5
HTML5HTML5
HTML5
 
Slides With Quad Chart Templates
Slides With Quad Chart TemplatesSlides With Quad Chart Templates
Slides With Quad Chart Templates
 
HTML, CSS and XML
HTML, CSS and XMLHTML, CSS and XML
HTML, CSS and XML
 
HTML - 5 - Introduction
HTML - 5 - IntroductionHTML - 5 - Introduction
HTML - 5 - Introduction
 
Overview of DITA 1.3
Overview of DITA 1.3Overview of DITA 1.3
Overview of DITA 1.3
 
VOCI Final Presentation
VOCI Final PresentationVOCI Final Presentation
VOCI Final Presentation
 
Actsheet10
Actsheet10Actsheet10
Actsheet10
 
Technology Research
Technology ResearchTechnology Research
Technology Research
 
Html5 Introduction
Html5 IntroductionHtml5 Introduction
Html5 Introduction
 
IT8005 Electronic Commerces Notes UNIT 1
IT8005 Electronic Commerces Notes UNIT 1IT8005 Electronic Commerces Notes UNIT 1
IT8005 Electronic Commerces Notes UNIT 1
 
Html5
Html5Html5
Html5
 
HTML5.pptx
HTML5.pptxHTML5.pptx
HTML5.pptx
 

Plus de OxfordCambridge

Computer Networks Foundation 2022
Computer Networks Foundation 2022Computer Networks Foundation 2022
Computer Networks Foundation 2022OxfordCambridge
 
Aligning IT and Business Strategies - Study Notes
Aligning IT and Business Strategies - Study NotesAligning IT and Business Strategies - Study Notes
Aligning IT and Business Strategies - Study NotesOxfordCambridge
 
Agile Project Management Principles and Methodologies - Study Notes
Agile Project Management Principles and Methodologies - Study NotesAgile Project Management Principles and Methodologies - Study Notes
Agile Project Management Principles and Methodologies - Study NotesOxfordCambridge
 
Defining Cryptography (Cryptography fundamentals 1/2)
Defining Cryptography (Cryptography fundamentals 1/2)Defining Cryptography (Cryptography fundamentals 1/2)
Defining Cryptography (Cryptography fundamentals 1/2)OxfordCambridge
 
Information Security Governance #2A
Information Security Governance #2AInformation Security Governance #2A
Information Security Governance #2AOxfordCambridge
 
Information Security Governance: Concepts, Security Management & Metrics
Information Security Governance: Concepts, Security Management & MetricsInformation Security Governance: Concepts, Security Management & Metrics
Information Security Governance: Concepts, Security Management & MetricsOxfordCambridge
 
Information Security Governance: Concepts, Security Management & Metrics
Information Security Governance: Concepts, Security Management & MetricsInformation Security Governance: Concepts, Security Management & Metrics
Information Security Governance: Concepts, Security Management & MetricsOxfordCambridge
 
Standard Business Etiquette - Study Notes
Standard Business Etiquette - Study NotesStandard Business Etiquette - Study Notes
Standard Business Etiquette - Study NotesOxfordCambridge
 
ICT Project Management - Study Notes
ICT Project Management - Study NotesICT Project Management - Study Notes
ICT Project Management - Study NotesOxfordCambridge
 
Win Over Stress in Work & Life - Study Notes
Win Over Stress in Work & Life - Study NotesWin Over Stress in Work & Life - Study Notes
Win Over Stress in Work & Life - Study NotesOxfordCambridge
 
SIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesSIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesOxfordCambridge
 
IP Mobility Concepts - Study Notes
IP Mobility Concepts - Study NotesIP Mobility Concepts - Study Notes
IP Mobility Concepts - Study NotesOxfordCambridge
 
Building a Simple Network - Study Notes
Building a Simple Network - Study NotesBuilding a Simple Network - Study Notes
Building a Simple Network - Study NotesOxfordCambridge
 
Win Over Stress: in Work & Life
Win Over Stress: in Work & LifeWin Over Stress: in Work & Life
Win Over Stress: in Work & LifeOxfordCambridge
 
Reaching a Balanced Life
Reaching a Balanced LifeReaching a Balanced Life
Reaching a Balanced LifeOxfordCambridge
 
Project Management Fundamentals
Project Management FundamentalsProject Management Fundamentals
Project Management FundamentalsOxfordCambridge
 
Overcoming Negativity in Workplace - Study Notes
Overcoming Negativity in Workplace - Study NotesOvercoming Negativity in Workplace - Study Notes
Overcoming Negativity in Workplace - Study NotesOxfordCambridge
 
Overcoming Negativity in the Workplace
Overcoming Negativity in the WorkplaceOvercoming Negativity in the Workplace
Overcoming Negativity in the WorkplaceOxfordCambridge
 
Business Analysis Essentials
Business Analysis EssentialsBusiness Analysis Essentials
Business Analysis EssentialsOxfordCambridge
 
Strategic Management Overview
Strategic Management OverviewStrategic Management Overview
Strategic Management OverviewOxfordCambridge
 

Plus de OxfordCambridge (20)

Computer Networks Foundation 2022
Computer Networks Foundation 2022Computer Networks Foundation 2022
Computer Networks Foundation 2022
 
Aligning IT and Business Strategies - Study Notes
Aligning IT and Business Strategies - Study NotesAligning IT and Business Strategies - Study Notes
Aligning IT and Business Strategies - Study Notes
 
Agile Project Management Principles and Methodologies - Study Notes
Agile Project Management Principles and Methodologies - Study NotesAgile Project Management Principles and Methodologies - Study Notes
Agile Project Management Principles and Methodologies - Study Notes
 
Defining Cryptography (Cryptography fundamentals 1/2)
Defining Cryptography (Cryptography fundamentals 1/2)Defining Cryptography (Cryptography fundamentals 1/2)
Defining Cryptography (Cryptography fundamentals 1/2)
 
Information Security Governance #2A
Information Security Governance #2AInformation Security Governance #2A
Information Security Governance #2A
 
Information Security Governance: Concepts, Security Management & Metrics
Information Security Governance: Concepts, Security Management & MetricsInformation Security Governance: Concepts, Security Management & Metrics
Information Security Governance: Concepts, Security Management & Metrics
 
Information Security Governance: Concepts, Security Management & Metrics
Information Security Governance: Concepts, Security Management & MetricsInformation Security Governance: Concepts, Security Management & Metrics
Information Security Governance: Concepts, Security Management & Metrics
 
Standard Business Etiquette - Study Notes
Standard Business Etiquette - Study NotesStandard Business Etiquette - Study Notes
Standard Business Etiquette - Study Notes
 
ICT Project Management - Study Notes
ICT Project Management - Study NotesICT Project Management - Study Notes
ICT Project Management - Study Notes
 
Win Over Stress in Work & Life - Study Notes
Win Over Stress in Work & Life - Study NotesWin Over Stress in Work & Life - Study Notes
Win Over Stress in Work & Life - Study Notes
 
SIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesSIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study Notes
 
IP Mobility Concepts - Study Notes
IP Mobility Concepts - Study NotesIP Mobility Concepts - Study Notes
IP Mobility Concepts - Study Notes
 
Building a Simple Network - Study Notes
Building a Simple Network - Study NotesBuilding a Simple Network - Study Notes
Building a Simple Network - Study Notes
 
Win Over Stress: in Work & Life
Win Over Stress: in Work & LifeWin Over Stress: in Work & Life
Win Over Stress: in Work & Life
 
Reaching a Balanced Life
Reaching a Balanced LifeReaching a Balanced Life
Reaching a Balanced Life
 
Project Management Fundamentals
Project Management FundamentalsProject Management Fundamentals
Project Management Fundamentals
 
Overcoming Negativity in Workplace - Study Notes
Overcoming Negativity in Workplace - Study NotesOvercoming Negativity in Workplace - Study Notes
Overcoming Negativity in Workplace - Study Notes
 
Overcoming Negativity in the Workplace
Overcoming Negativity in the WorkplaceOvercoming Negativity in the Workplace
Overcoming Negativity in the Workplace
 
Business Analysis Essentials
Business Analysis EssentialsBusiness Analysis Essentials
Business Analysis Essentials
 
Strategic Management Overview
Strategic Management OverviewStrategic Management Overview
Strategic Management Overview
 

Dernier

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Dernier (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

HTML5 Tutorial Sections

  • 1. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology HTML5 Tutorial
  • 2. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology HTML5 Tutorial KeyPoints to develop in your own time! Introductory concepts in HTML5 @ OxfordCambridge.Org all for free and free for all. The information gathered here are under the format of KeyPoints for readers to develop in their own time. Some tips on how to proceed, perhaps: - Identify all the Keypoints on which you feel a need to expand your knowledge. - Choose a good book or two or info from Internet and then work towards gaining the needed knowledge. Please Enjoy!
  • 3. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology To introduce the reader or the learner to the next generation of HTML: HTML5. Aim of publication
  • 4. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology After developing the KeyPoints outlined in this publication, you should mainly be able: ☺ To comprehend the new features in HTML5. ☺ Comprehend some of the most interesting new features in HTML5. ☺ Explore some of the most interesting new features of HTML5. Learning Objectives
  • 5. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology ☺ (Section 1) HTML5 Introduction ☺ (Section 2) HTML5 New Elements ☺ (Section 3) HTML5 Video ☺ (Section 4) HTML5 Audio ☺ (Section 5) HTML5 Canvas ☺ (Section 6) HTML5 Web Storage HTML5 Tutorial - Sections List
  • 6. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 1) HTML5 Introduction – Summary ☺ HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. ☺ The previous version of HTML came in 1999. ☺ The web has changed a lot since then. ☺ HTML5 is still a work in progress. ☺ However, most modern browsers have some HTML5 support.
  • 7. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 1) HTML5 Introduction – HighPoints ☺ How Did HTML5 Get Started? ☺ New Features ☺ Browser Support
  • 8. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 1) HighPoints – How Did HTML5 Get Started? ☺ HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG). ☺ WHATWG was working with web forms and applications, and W3C was working with XHTML 2.0. ☺ In 2006, they decided to cooperate and create a new version of HTML.
  • 9. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 1) HighPoints – How Did HTML5 Get Started? ☺ Some rules for HTML5 were established: ☺ * New features should be based on HTML, CSS, DOM, and JavaScript ☺ * Reduce the need for external plugins (like Flash) ☺ * Better error handling ☺ * More markup to replace scripting ☺ * HTML5 should be device independent ☺ * The development process should be visible to the public.
  • 10. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 1) HighPoints – New Features. ☺ Some of the most interesting new features in HTML5: ☺ * The canvas element for drawing ☺ * The video and audio elements for media playback ☺ * Better support for local offline storage ☺ * New content specific elements, like article, footer, header, nav, section ☺ * New form controls, like calendar, date, time, email, url, search
  • 11. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 1) HighPoints – Browser Support. ☺ 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.
  • 12. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HTML5 New Elements – Summary ☺ New elements for better structure. ☺ HTML5 provides a new standard for media content. ☺ The canvas element uses JavaScript to make drawings on a web page. ☺ HTML5 offers more form elements, with more functionality. ☺ lso, the input element's type attribute has many new values, for better input control before sending it to the server.
  • 13. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HTML5 New Elements – HighPoints ☺ New Elements in HTML5 ☺ New Markup Elements ☺ New Media Elements ☺ The Canvas Element ☺ New Form Elements ☺ New Input Type Attribute Values
  • 14. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – New Elements in HTML5 ☺ The 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 deleted or re-written in HTML5. ☺ To better handle today's internet use, HTML5 also includes new elements for better structure, drawing, media content, and better form handling.
  • 15. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – New Markup Elements ☺ <Tag> Description ☺ <article> For external content, like text from a news-article, blog, forum, or any other content from an external source ☺ <aside> For content aside from the content it is placed in. The aside content should be related to the surrounding content ☺ <command> A button, or a radiobutton, or a checkbox ☺ <details> For describing details about a document, or parts of a document ☺ <summary> A caption, or summary, inside the details element
  • 16. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – New Markup Elements ☺ <Tag> Description ☺ <figure> For grouping a section of stand-alone content, could be a video. ☺ <figcaption> The caption of the figure section. ☺ <footer> For a footer of a document or section, could include the name of the author, the date of the document, contact information, or copyright information. ☺ <header> For an introduction of a document or section, could include navigation.
  • 17. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – New Markup Elements ☺ <hgroup> For a section of headings, using <h1> to <h6>, where the largest is the main heading of the section, and the others are sub- headings. ☺ <mark> For text that should be highlighted. ☺ <meter> For a measurement, used only if the maximum and minimum values are known. ☺ <nav> For a section of navigation ☺ <progress> The state of a work in progress ☺ <ruby> For ruby annotation (Chinese notes or characters)
  • 18. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – New Markup Elements ☺ <Tag> Description ☺ <rt> For explanation of the ruby annotation ☺ <rp> What to show browsers that do not support the ruby element ☺ <section> For a section in a document. Such as chapters, headers, footers, or any other sections of the document ☺ <time> For defining a time or a date, or both ☺ <wbr> Word break. For defining a line-break opportunity.
  • 19. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – New Media Elements ☺ HTML5 provides a new standard for media content: ☺ <Tag> Description ☺ <audio> 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.
  • 20. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – The Canvas Element ☺ The canvas element uses JavaScript to make drawings on a web page. ☺ <Tag> Description ☺ <canvas> For making graphics with a script.
  • 21. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – The Canvas Element
  • 22. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – New Form Elements ☺ HTML5 offers more form elements, with more functionality: ☺ <Tag> Description ☺ <datalist> A list of options for input values ☺ <keygen> Generate keys to authenticate users ☺ <output> For different types of output, such as output written by a script.
  • 23. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – New Input Type Attribute Values ☺ The input element's type attribute has many new values, for better input control before sending it to the server: ☺ <Tag> Description ☺ tel The input value is of type telephone number ☺ Search The input field is a search field ☺ url The input value is a URL ☺ email The input value is one or more email addresses ☺ datetime The input value is a date and/or time ☺ date The input value is a date
  • 24. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 2) HighPoints – New Input Type Attribute Values ☺ <Tag> Description ☺ month The input value is a month ☺ week The input value is a week ☺ time The input value is of type time ☺ datetime-local The input value is a local date/time ☺ number The input value is a number ☺ range The input value is a number in a given range ☺ color The input value is a hexadecimal color, like #FF8800.
  • 25. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 3) HTML5 Video – Summary. ☺ Many modern websites shows videos. HTML5 provides a standard for showing them. ☺ Until now, there has never been a standard for showing video on a web page. ☺ Currently, with HTML5, there are 3 supported video formats for the video element.
  • 26. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 3) HTML5 Video – HighPoints ☺ Video on the Web ☺ Video Formats ☺ How It Works ☺ All <video> Attributes
  • 27. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 3) HighPoints – Video on the Web ☺ Until now, there has never been a standard for showing video on a web page. ☺ Today, most videos are shown through a plugin (like flash). ☺ However, not all browsers have the same plugins. ☺ HTML5 specifies a standard way to include video, with the video element.
  • 28. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 3) HighPoints – Video Formats ☺ Ogg = Ogg files with Theora video codec and Vorbis audio codec. ☺ MPEG4 = MPEG 4 files with H.264 video codec and AAC audio codec. ☺ WebM = WebM files with VP8 video codec and Vorbis audio codec.
  • 29. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 3) HighPoints – Video Formats: How It Works ☺ To show a video in HTML5, this is all you need: <video src="movie.ogg" controls="controls"> </video> ☺ The control attribute is for adding play, pause, and volume controls. ☺ It is also always a good idea to include the width and height attributes. ☺ Insert content between the <video> and </video> tags for browsers that do not support the video element: ☺ Example: ☺ <video src="movie.ogg" width="320" height="240" controls="controls">Your browser does not support the video tag.</video> ☺ The example above uses an Ogg file, and will work in Firefox, Opera and Chrome.
  • 30. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 3) HighPoints – Video Formats: How It Works ☺ To make the video work in Internet Explorer, Safari and future versions of Chrome, we must add a MPEG4 and WebM file. ☺ The video element allows multiple source elements. ☺ Source elements can link to different video files. ☺ The browser will use the first recognized format: ☺ Example: ☺ <video width="320" height="240" controls="controls"> <source src="movie.ogg" type="video/ogg" /> <source src="movie.mp4" type="video/mp4" /> <source src="movie.webm" type="video/webm" /> Your browser does not support the video tag. </video>
  • 31. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 3) HighPoints – All <video> Attributes ☺ Attribute Value Description ☺ audio muted Defining the default state of the the audio. Currently, only "muted" is allowed ☺ autoplay autoplay If present, then the video will start playing as soon as it is ready ☺ controls controls If present, controls will be displayed, such as a play button ☺ height pixels Sets the height of the video player ☺ loop loop If present, the video will start over again, every time it is finished
  • 32. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 3) HighPoints – All <video> Attributes ☺ Attribute Value Description ☺ poster url Specifies the URL of an image representing the video ☺ preload preload If present, the video will be loaded at page load, and ready to run. Ignored if "autoplay" is present ☺ src url The URL of the video to play ☺ width pixels Sets the width of the video player.
  • 33. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 4) HTML5 Audio – Summary ☺ HTML5 provides a standard for playing audio. ☺ Until now, there has never been a standard for playing audio on a web page. ☺ Currently, there are 3 supported formats for the audio element in HTML5.
  • 34. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 4) HTML5 Audio – HighPoints. ☺ Audio on the Web ☺ Audio Formats ☺ How It Works ☺ All <audio> Attributes
  • 35. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 4) HighPoints – Audio on the Web ☺ Until now, there has never been a standard for playing audio on a web page. ☺ Today, most audio are played through a plugin (like flash). ☺ However, not all browsers have the same plugins. ☺ HTML5 specifies a standard way to include audio, with the audio element. ☺ The audio element can play sound files, or an audio stream.
  • 36. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 4) HighPoints – Audio Formats ☺ Currently, there are 3 supported formats for the audio element: ☺ Ogg Vorbis ☺ MP3 ☺ Wav
  • 37. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 4) HighPoints – Audio Formats: How It Works ☺ To play an audio file in HTML5, this is all you need: ☺ <audio src="song.ogg" controls="controls"> </audio> ☺ The control attribute is for adding play, pause, and volume controls. ☺ Insert content between the <audio> and </audio> tags for browsers that do not support the audio element: ☺ Example: ☺ <audio src="song.ogg" controls="controls"> Your browser does not support the audio element. </audio> ☺ The example above uses an Ogg file, and will work in Firefox, Opera and Chrome.
  • 38. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 4) HighPoints – Audio Formats: How It Works ☺ To make the audio work in Internet Explorer and Safari, add an audio file of the type MP3. ☺ The audio element allows multiple source elements. ☺ Source elements can link to different audio files. ☺ The browser will use the first recognized format: ☺ Example: ☺ <audio controls="controls"> <source src="song.ogg" type="audio/ogg" /> <source src="song.mp3" type="audio/mpeg" /> Your browser does not support the audio element. </audio>
  • 39. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 4) HighPoints – All <audio> Attributes ☺ attribute Value Description ☺ autoplay autoplay Specifies that the audio will start playing as soon as it is ready. ☺ controls controls Specifies that controls will be displayed, such as a play button. ☺ loop loop Specifies that the audio will start playing again (looping) when it reaches the end ☺ preload preload Specifies that the audio will be loaded at page load, and ready to run. Ignored if autoplay is present. ☺ src url Specifies the URL of the audio to play.
  • 40. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HTML5 Canvas – Summary. ☺ The canvas element is used to draw graphics on a web page. ☺ The HTML5 canvas element uses JavaScript to draw graphics on a web page. ☺ The canvas element has no drawing abilities of its own. ☺ All drawing must be done inside a JavaScript.
  • 41. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HTML5 Canvas – HighPoints. ☺ What is Canvas? ☺ Create a Canvas Element ☺ Draw With JavaScript ☺ Understanding Coordinates ☺ More Canvas Examples
  • 42. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – What is Canvas? ☺ The HTML5 canvas element uses JavaScript to draw graphics on a web page. ☺ A canvas is a rectangular area, and you control every pixel of it. ☺ The canvas element has several methods for drawing paths, boxes, circles, characters, and adding images.
  • 43. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – Create a Canvas Element ☺ Add a canvas element to the HTML5 page. ☺ Specify the id, width, and height of the element: ☺ <canvas id="myCanvas" width="200" height="100"></canvas>
  • 44. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – Draw With JavaScript ☺ The canvas element has no drawing abilities of its own. All drawing must be done inside a JavaScript: ☺ Example: ☺ <script type="text/javascript"> var c=document.getElementById("myCanvas"); var cxt=c.getContext("2d"); cxt.fillStyle="#FF0000";cxt.fillRect(0,0,150 ,75); </script> ☺ JavaScript uses the id to find the canvas element: ☺ var c=document.getElementById("myCanvas");
  • 45. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – Draw With JavaScript ☺ Then, create a context object: ☺ var cxt=c.getContext("2d"); ☺ The getContext("2d") object is a built-in HTML5 object, with many methods to draw paths, boxes, circles, characters, images and more. ☺ The next two lines draws a red rectangle: ☺ cxt.fillStyle="#FF0000"; cxt.fillRect(0,0,150,75); ☺ The fillStyle method makes it red, and the fillRect method specifies the shape, position, and size.
  • 46. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – Understanding Coordinates ☺ The fillRect method above had the parameters (0,0,150,75). ☺ This means: Draw a 150x75 rectangle on the canvas, starting at the top left corner (0,0). ☺ The canvas' X and Y coordinates are used to position drawings on the canvas. ☺ Mouse over the rectangle below to see the coordinates:.
  • 47. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – More Canvas Examples ☺ These are more examples of drawing on the canvas element: ☺ Example – Line: Draw a line by specifying where to start, and where to stop ☺ Example – Circle: Draw a circle by specifying the size, color, and position ☺ Example – Gradient: Draw a gradient background with the colors you specify ☺ Example – Image: Put an image on the canvas
  • 48. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – More Canvas Examples: Line ☺ Example – Line: Draw a line by specifying where to start, and where to stop ☺ <!DOCTYPE HTML> ☺ <html> ☺ <body> ☺ <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;"> ☺ Your browser does not support the canvas element. ☺ </canvas>
  • 49. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – More Canvas Examples: Line ☺ <script type="text/javascript"> ☺ var c=document.getElementById("myCanvas"); ☺ var cxt=c.getContext("2d"); ☺ cxt.moveTo(10,10); ☺ cxt.lineTo(150,50); ☺ cxt.lineTo(10,50); ☺ cxt.stroke(); ☺ </script> ☺ </body> ☺ </html>
  • 50. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – More Canvas Examples: Circle ☺ Example – Circle: Draw a circle by specifying the size, color, and position ☺ <!DOCTYPE HTML> ☺ <html> ☺ <body> ☺ <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;"> ☺ Your browser does not support the canvas element. ☺ </canvas>
  • 51. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – More Canvas Examples: Circle ☺ <script type="text/javascript"> ☺ var c=document.getElementById("myCanvas"); ☺ var cxt=c.getContext("2d"); ☺ cxt.fillStyle="#FF0000"; ☺ cxt.beginPath(); ☺ cxt.arc(70,18,15,0,Math.PI*2,true); ☺ cxt.closePath(); ☺ cxt.fill(); ☺ </script> ☺ </body> ☺ </html>
  • 52. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – More Canvas Examples: Gradient ☺ Example – Gradient: Draw a gradient background with the colors you specify ☺ <!DOCTYPE HTML> ☺ <html> ☺ <body> ☺ <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;"> ☺ Your browser does not support the canvas element. ☺ </canvas>
  • 53. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – More Canvas Examples: Gradient ☺ <script type="text/javascript"> ☺ var c=document.getElementById("myCanvas"); ☺ var cxt=c.getContext("2d"); ☺ var grd=cxt.createLinearGradient(0,0,175,50); ☺ grd.addColorStop(0,"#FF0000"); ☺ grd.addColorStop(1,"#00FF00"); ☺ cxt.fillStyle=grd; ☺ cxt.fillRect(0,0,175,50); ☺ </script> ☺ </body> ☺ </html>
  • 54. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – More Canvas Examples: Image ☺ Example – Image: Put an image on the canvas ☺ <!DOCTYPE HTML> ☺ <html> ☺ <body> ☺ <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;"> ☺ Your browser does not support the canvas element. ☺ </canvas>
  • 55. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 5) HighPoints – More Canvas Examples: Image ☺ <script type="text/javascript"> ☺ var c=document.getElementById("myCanvas"); ☺ var cxt=c.getContext("2d"); ☺ var img=new Image(); ☺ img.src="img_flwr.png"; ☺ cxt.drawImage(img,0,0); ☺ </script> ☺ </body> ☺ </html>
  • 56. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 6) HTML5 Web Storage – Summary ☺ HTML5 offers two new objects for storing data on the client. ☺ The localStorage object stores the data with no time limit. ☺ The sessionStorage object stores the data for one session.
  • 57. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 6) HTML5 Web Storage – HighPoints. ☺ Storing Data on the Client ☺ The localStorage Object ☺ The sessionStorage Object
  • 58. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 6) HighPoints – Storing Data on the Client ☺ HTML5 offers two new objects for storing data on the client: ☺ localStorage - stores data with no time limit ☺ sessionStorage - stores data for one session ☺ Earlier, this was done with cookies. Cookies are not suitable for large amounts of data, because they are passed on by EVERY request to the server, making it very slow and in-effective.
  • 59. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 6) HighPoints – Storing Data on the Client ☺ In HTML5, the data is NOT passed on by every server request, but used ONLY when asked for. ☺ It is possible to store large amounts of data without affecting the website's performance. ☺ The data is stored in different areas for different websites, and a website can only access data stored by itself. ☺ HTML5 uses JavaScript to store and access the data.
  • 60. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 6) HighPoints – The localStorage Object ☺ The localStorage object stores the data with no time limit. ☺ The data will be available the next day, week, or year. ☺ To create and access a localStorage: ☺ Example: ☺ <script type="text/javascript"> ☺ localStorage.lastname="Smith"; ☺ document.write(localStorage.lastname); ☺ </script>
  • 61. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 6) HighPoints – The localStorage Object ☺ The following example counts the number of times a user has visited a page: ☺ <script type="text/javascript"> ☺ if (localStorage.pagecount) ☺ { ☺ localStorage.pagecount=Number(localStorage. pagecount) +1; ☺ } ☺ else ☺ { ☺ localStorage.pagecount=1; ☺ } ☺ document.write("Visits "+ localStorage.pagecount + " time(s)."); ☺ </script>
  • 62. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 6) HighPoints – The sessionStorage Object ☺ The sessionStorage object stores the data for one session. ☺ The data is deleted when the user closes the browser window. ☺ How to create and access a sessionStorage: ☺ Example: ☺ <script type="text/javascript"> ☺ sessionStorage.lastname="Smith"; ☺ document.write(sessionStorage.lastname); ☺ </script>
  • 63. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology (Section 6) HighPoints – The sessionStorage Object ☺ The following example counts the number of times a user has visited a page, in the current session: ☺ <script type="text/javascript"> ☺ if (sessionStorage.pagecount) ☺ { ☺ sessionStorage.pagecount=Number(sessionStorage.pag ecount) +1; ☺ } ☺ else ☺ { ☺ sessionStorage.pagecount=1; ☺ } ☺ document.write("Visits "+sessionStorage.pagecount+" time(s) this session."); ☺ </script>
  • 64. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology HTML5 Tutorial – Conclusion. ☺ At this point you should be able to be familiar with the following: • Understand that HTML5 is the new standard for HTML • But that HTML5 is still a work in progress • Comprehend its new features • Explore some of the most interesting new features of HTML5
  • 65. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology
  • 66. Contact Email Design Copyright 1994-2013 © OxfordCambridge.OrgInformation Technology