SlideShare a Scribd company logo
HTML5	
  
Mehdi	
  Jalal	
  
Trainer:	
  Cresco	
  Solu4on	
  
So5ware	
  Developer:	
  NETLINKS	
  
Email:	
  mehdi@netlinks.af	
  
Skype:	
  mehdijalal01	
  
	
  
	
  
	
  	
  	
  	
  
Afghanistan	
  Workforce	
  
Development	
  Program	
  
	
  	
  
Html5
Agenda	
  
•  HTML5	
  Introduc4on	
  
•  HTML5	
  New	
  Elements	
  
•  HTML5	
  Canvas	
  
•  HTML5	
  SVG	
  
•  HTML5	
  Drag/Drop	
  
•  HTML5	
  Geoloca4on	
  
•  HTML5	
  Video	
  
•  HTML5	
  Audio	
  
•  HTML5	
  Input	
  Types	
  
Agenda	
  
•  HTML5	
  Form	
  Elements	
  
•  HTML5	
  Form	
  ASributes	
  
•  HTML5	
  Seman4c	
  Elements	
  
•  HMTL5	
  Web	
  Storage	
  
•  HMTL5	
  Applica4on	
  Cache	
  
•  HMTL5	
  Web	
  Workers	
  

Recommended for you

Next generation Graphics: SVG
Next generation Graphics: SVGNext generation Graphics: SVG
Next generation Graphics: SVG

This document provides an overview and summary of Scalable Vector Graphics (SVG). It begins with a brief introduction to SVG concepts like basic shapes. It then discusses the history and evolution of SVG standards over time. It outlines how SVG is commonly used today in areas like logos, icons, charts and graphics. Examples are given of tools for editing, optimizing and automating SVG. Reasons for using SVG like crisp images, scriptability, animations and small file sizes are explained. The document discusses how SVG is used and its potential in Drupal. It concludes with an overview of the future SVG 2 standard and resources for learning more about SVG.

html5csssvg
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now

The final spec of html5 won't be ready until 2022, but you don't have to wait that long to start using it today and build really advanced web apps.

SVG - Scalable Vector Graphic
SVG - Scalable Vector GraphicSVG - Scalable Vector Graphic
SVG - Scalable Vector Graphic

Scalable Vector Graphics (SVG) is an open standard, XML-based vector image format for two-dimensional graphics.

svgvector graphic
HTML5	
  Introduc4on	
  
•  What	
  is	
  HTML5?	
  
– HTML5	
  will	
  be	
  the	
  standard	
  for	
  HTML	
  
– HTML	
  4.01	
  came	
  in	
  1999.	
  Web	
  changed	
  a	
  lot!	
  
– HTML5	
  is	
  s4ll	
  work	
  in	
  progress	
  
– Major	
  browsers	
  support	
  HTML5	
  elements	
  &	
  API	
  
•  How	
  Did	
  HTML5	
  Get	
  Started?	
  
– Coopera4on	
  between	
  World	
  Wide	
  Web	
  
Consor4um	
  (W3C)	
  and	
  Web	
  Hypertext	
  Applica4on	
  
Technology	
  Working	
  Group	
  (WHATWG)	
  
HTML5	
  Introduc4on	
  
•  The	
  HTML5	
  <!DOCTYPE>	
  
– There	
  is	
  only	
  one	
  <!DOCTYPE>	
  declara4on.	
  Simple	
  
	
  
	
   <!DOCTYPE html>
HTML5	
  Introduc4on	
  
•  Minimum	
  HTML5	
  Document	
  
	
   <!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
HTML5	
  Introduc4on	
  
•  HTML5	
  New	
  Features	
  
– The	
  <canvas>	
  element	
  for	
  2D	
  drawing	
  
– The	
  <video>	
  and	
  <audio>	
  elements	
  for	
  media	
  
playback	
  
– Support	
  for	
  local	
  storage	
  
– New	
  content-­‐specific	
  elements,	
  like	
  <ar4cle>,	
  
<footer>,	
  <header>,	
  <nav>,	
  <sec4on>	
  
– New	
  form	
  controls,	
  like	
  calendar,	
  date,	
  4me,	
  
email,	
  url,	
  search	
  

Recommended for you

HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour

This document provides an overview of HTML5 and related technologies. It discusses how HTML5 is more than just HTML, and covers the HTML5 specification process and components. It then provides a tour of new HTML5 features like <video>, <audio>, SVG, <canvas>, geolocation, and CSS3 specifications including borders, colors, shadows, backgrounds, fonts, media queries and transforms. The document demonstrates several of these features and provides resources for further information.

html html5 w3c
Learn svg
Learn svgLearn svg
Learn svg

This document introduces Scalable Vector Graphics (SVG) and provides an overview of its history, capabilities, and structure. Key points include: - SVG was developed as an open standard by the W3C to provide rich, reusable visual content for the web using XML. - SVG allows for vector graphics that can be scaled, manipulated via scripting, styled with CSS, and more. It provides many advantages over raster graphics. - As an XML format, SVG files are small in size, resolution-independent, and can be dynamically generated and styled on the client-side via JavaScript. - The document outlines SVG's emergence and development timeline, its structure as an XML language, and its

svgebooklearn svg
WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)

This document discusses HTML5 and provides an overview of its key features. It explains that HTML5 is not just the HTML language, but also includes related APIs that allow richer functionality. Some of the major areas covered include semantics and accessibility, rich internet applications using new APIs, and specific technologies like canvas, video/audio, web storage, and web workers. The document emphasizes that HTML5 is still evolving and aims to unify web development across browsers.

html5
HTML5	
  Introduc4on	
  
•  Browser	
  Support	
  for	
  HTML5	
  
– Not	
  full	
  standard!	
  
– No	
  browser	
  has	
  full	
  support	
  
– In	
  a	
  con4nuous	
  development	
  (Chrome,	
  Safari,	
  
Internet	
  Explorer,	
  Firefox,	
  Opera)	
  	
  
Html5
HTML5	
  New	
  Elements	
  
•  Use	
  of	
  internet	
  changed	
  a	
  lot	
  since	
  HTML	
  4.01	
  
(1999)	
  
•  Several	
  HTML	
  4.01	
  elements	
  are	
  obsolete,	
  never	
  
used	
  or	
  never	
  used	
  the	
  way	
  they	
  were	
  intended	
  
•  To	
  beSer	
  handle	
  todays	
  internet,	
  HTML5	
  brings	
  
new	
  changes:	
  New	
  elements	
  for	
  drawing	
  
graphics,	
  adding	
  media	
  content,	
  beSer	
  page	
  
structure,	
  beSer	
  form	
  handling,	
  and	
  several	
  APIs	
  
to	
  drag/drop	
  elements,	
  find	
  Geoloca4on,	
  include	
  
web	
  storage,	
  applica4on	
  cache,	
  web	
  workers,	
  
etc.	
  
HTML5	
  New	
  Elements	
  

Recommended for you

SilverlightDevIntro
SilverlightDevIntroSilverlightDevIntro
SilverlightDevIntro

Microsoft Silverlight is a cross-browser plugin that allows developers to build rich interactive applications and media experiences for the web. Key features include vector graphics, media playback, animation, and integration with existing web pages. Silverlight uses XAML for markup and a .NET subset for programming. It provides a sandboxed runtime environment and supports common development scenarios like media, rich content, and rich internet applications. Developers can use XAML to build user interfaces with shapes, brushes, text and images, and add interactivity through transforms and animation.

Html5 public
Html5 publicHtml5 public
Html5 public

HTML5 is a new version of HTML that aims to improve the semantic structure and functionality of web pages. It introduces new elements like <header>, <nav>, <article>, and <footer> to better define page sections. While browser support is still evolving, many modern browsers support key HTML5 features. The HTML5 specification is developed by the World Wide Web Consortium to advance web standards.

Svg
SvgSvg
Svg

SVG (Scalable Vector Graphics) is a XML-based format for defining vector graphics. It allows graphics to be scalable, zoomable and searchable. Common SVG shapes that can be created include circles, rectangles, ellipses, lines, and paths. Attributes like cx, cy, r are used to define properties of circles and ellipses, while x1, y1, x2, y2 define the start and end points of a line. SVG graphics do not lose quality when resized.

HTML5	
  New	
  Elements	
  
HTML5	
  New	
  Elements	
  
HTML5	
  New	
  Elements	
  
HTML5	
  New	
  Elements	
  

Recommended for you

HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)

I based my presention on the great "HTML5 for Web designers" by Jeremy Keith. Awesome and pragmatic book, the way I like it. Get your copy on: http://books.alistapart.com/products/html5-for-web-designers

htmlaudiowhatwg
Css
CssCss
Css

This document provides an overview of CSS (Cascading Style Sheets) including its history, basic syntax and structure, common properties that can be styled, and different methods for applying styles. Key points covered include using CSS to style fonts, colors, links, and page layout with properties like padding, margin, and floats. The document also demonstrates how to select elements with IDs, classes, and other selectors to style them.

Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails

This document discusses technologies for creating and maintaining web applications. It covers Ruby and the Rails framework. Ruby is designed to be programmer-focused rather than machine-focused, helping create dynamic and self-explained code. Rails enables quickly building web servers through conventions, reuse, single responsibility principles, and features that provide quick setup, deployment, and built-in scalability. The document also discusses front-end architecture with client-side logic, and Rails features for development, deployment, databases, assets, and multi-environment configuration.

ruby on railsweb development.net framework
HTML5	
  New	
  Elements	
  
•  Removed	
  Elements	
  
–  <acronym>	
  
–  <applet>	
  
–  <basefont>	
  
–  <big>	
  
–  <center>	
  
–  <dir>	
  
–  <font>	
  
–  <frame>	
  
–  <frameset>	
  
–  <noframes>	
  
–  <strike>	
  
–  <S>	
  
HTML5	
  Canvas	
  
•  The	
  <canvas>	
  element	
  is	
  used	
  to	
  draw	
  graphics,	
  
on	
  the	
  fly,	
  on	
  a	
  web	
  page.	
  
•  What	
  is	
  Canvas?	
  
–  The	
  HTML5	
  <canvas>	
  element	
  is	
  used	
  to	
  draw	
  
graphics,	
  on	
  the	
  fly,	
  via	
  scrip4ng	
  (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,	
  characters,	
  and	
  adding	
  images.	
  
HTML5	
  Canvas	
  
•  Browser	
  Support	
  
– Internet	
  Explorer	
  9+,	
  Firefox,	
  Opera,	
  Chrome,	
  and	
  
Safari	
  support	
  the	
  <canvas>	
  element.	
  
– Note:	
  Internet	
  Explorer	
  8	
  and	
  earlier	
  versions,	
  do	
  
not	
  support	
  the	
  <canvas>	
  element.	
  
•  Crea4ng	
  a	
  Canvas	
  
<canvas id="myCanvas" width="200"
height="100"></canvas>
HTML5	
  Canvas	
  
•  Tip:	
  You	
  can	
  have	
  mul4ple	
  <canvas>	
  elements	
  
on	
  one	
  HTML	
  page.	
  	
  
•  Canvas	
  example:	
  
	
  
<canvas id="myCanvas" width="200"
height="100"
style="border:1px solid #000000;">
</canvas>

Recommended for you

Accessibility Hacks version 2
Accessibility Hacks version 2Accessibility Hacks version 2
Accessibility Hacks version 2

The document discusses using SVG images and CSS techniques to improve accessibility in WordPress themes. It provides tips for using SVG images in an accessible way, such as adding the "role=img" attribute to SVG files and using the <title> or <desc> elements for inline SVGs. It also suggests using CSS classes to hide non-essential text from sighted users while retaining it for screen readers. The document demonstrates how highlighting different page elements in the CSS can help test that landmarks and other accessibility standards are properly implemented.

wordpressaccessibility
The Future Of CSS
The Future Of CSSThe Future Of CSS
The Future Of CSS

This document summarizes Andy Budd's presentation on the future of CSS. It provides a brief history of CSS, outlines how CSS3 modules are organized, and identifies some priority areas for the CSS working group. It then demonstrates several interesting CSS3 features that can be used now, such as attribute selectors, rounded corners, drop shadows, and multi-column layout. Budd concludes by discussing the potential for CSS2.2 and layout modules in CSS3.

HTML5: Introduction
HTML5: IntroductionHTML5: Introduction
HTML5: Introduction

The document discusses the features and capabilities of HTML5. It covers new semantic elements, forms, offline storage, device access, multimedia, 3D graphics, performance improvements, and CSS3 features. Key points include more meaningful tags, custom data attributes, offline application caching, geolocation, cameras, web sockets, and canvas/WebGL for graphics.

htmlcssweb development
HTML5	
  Canvas	
  
•  Draw	
  Onto	
  The	
  Canvas	
  With	
  Javascript	
  
	
   <script>
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.fillStyle="#FF0000";
ctx.fillRect(0,0,150,75);
</script>
HTML5	
  Canvas	
  
•  Canvas	
  Coordinates	
  
•  This	
  means:	
  Start	
  at	
  the	
  upper-­‐le5	
  corner	
  (0,0)	
  
and	
  draw	
  a	
  150x75	
  pixels	
  rectangle.	
  
HTML5	
  Canvas	
  
•  Canvas	
  Paths	
  
– To	
  draw	
  straight	
  lines	
  on	
  a	
  canvas,	
  we	
  will	
  use	
  the	
  
following	
  two	
  methods:	
  
•  moveTo(x,y)	
  defines	
  the	
  star4ng	
  point	
  of	
  the	
  line	
  
•  lineTo(x,y)	
  defines	
  the	
  ending	
  point	
  of	
  the	
  line	
  
– To	
  actually	
  draw	
  the	
  line,	
  we	
  must	
  use	
  one	
  of	
  the	
  
"ink"	
  methods,	
  like	
  stroke().	
  
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.moveTo(0,0);
ctx.lineTo(200,100);
ctx.stroke();
HTML5	
  Canvas	
  
•  To	
  draw	
  a	
  circle	
  on	
  a	
  canvas,	
  we	
  will	
  use	
  the	
  
following	
  method:	
  
– arc(x,y,r,start,stop)	
  
•  To	
  actually	
  draw	
  the	
  circle,	
  we	
  must	
  use	
  one	
  
of	
  the	
  "ink"	
  methods,	
  like	
  stroke()	
  or	
  fill().	
  
	
  var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.beginPath();
ctx.arc(95,50,40,0,2*Math.PI);
ctx.stroke();

Recommended for you

Accessibility Hacks Wordcamp Manchester October 2018
Accessibility Hacks Wordcamp Manchester October 2018Accessibility Hacks Wordcamp Manchester October 2018
Accessibility Hacks Wordcamp Manchester October 2018

A bunch of small accessibility tweaks that WordPress theme builders can make to improve the accessibility of their products. Contains a section on making SVG files accessible to screen reader users. And then some CSS techniques that can help trap accessibility gotchas when building themes, and for content authors when they preview posts or pages.

Retirement income
Retirement incomeRetirement income
Retirement income

Retirement income presentation in Chinese.

The south after the civil war
The south after the civil warThe south after the civil war
The south after the civil war

After the Civil War, groups of women searched battlefields to recover and identify the remains of Confederate soldiers who were buried in mass graves. They established cemeteries like Marietta City & Confederate Cemetery and Marietta National Cemetery to properly bury the Union and Confederate dead. Historic Oakland Cemetery in Atlanta also contains a Confederate section known as the "Garden of Heroes" where approximately 3,900 Confederate soldiers are interred alongside monuments honoring the Confederate dead. These cemeteries helped preserve the memory of those who lost their lives during the Civil War.

HTML5	
  Canvas	
  
•  To	
  draw	
  text	
  on	
  a	
  canvas,	
  the	
  most	
  important	
  
property	
  and	
  methods	
  are:	
  
– font	
  -­‐	
  defines	
  the	
  font	
  proper4es	
  for	
  text	
  
– fillText(text,x,y)	
  -­‐	
  Draws	
  "filled"	
  text	
  on	
  the	
  canvas	
  
– strokeText(text,x,y)	
  -­‐	
  Draws	
  text	
  on	
  the	
  canvas	
  (no	
  
fill)	
  
Using	
  fillText():	
  
	
  var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.font="30px Arial";
ctx.fillText("Hello World",10,50);
HTML5	
  Canvas	
  
Using	
  strokeText():	
  
	
  
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.font="30px Arial";
ctx.strokeText("Hello World",10,50);
HTML5	
  SVG	
  
•  HTML5	
  has	
  support	
  for	
  inline	
  SVG.	
  
•  What	
  is	
  SVG?	
  
–  SVG	
  stands	
  for	
  Scalable	
  Vector	
  Graphics	
  
–  SVG	
  is	
  used	
  to	
  define	
  vector-­‐based	
  graphics	
  for	
  the	
  
Web	
  
–  SVG	
  defines	
  the	
  graphics	
  in	
  XML	
  format	
  
–  SVG	
  graphics	
  do	
  NOT	
  lose	
  any	
  quality	
  if	
  they	
  are	
  
zoomed	
  or	
  resized	
  
–  Every	
  element	
  and	
  every	
  aSribute	
  in	
  SVG	
  files	
  can	
  be	
  
animated	
  
–  SVG	
  is	
  a	
  W3C	
  recommenda4on	
  
HTML5	
  SVG	
  
•  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	
  
resolu4on	
  
–  SVG	
  images	
  are	
  zoomable	
  (and	
  the	
  image	
  can	
  be	
  
zoomed	
  without	
  degrada4on)	
  

Recommended for you

Prospectiva
ProspectivaProspectiva
Prospectiva

El documento explora los conceptos de prospectiva y prospectiva tecnológica. La prospectiva se define de diferentes maneras pero en esencia busca iluminar el presente con la luz de los futuros posibles a través de métodos como la construcción de escenarios. La prospectiva tecnológica identifica las tecnologías emergentes que podrían generar beneficios económicos y sociales mediante procesos participativos con expertos. El documento describe algunas metodologías y los pasos de un proceso de prospectiva tecnológica.

prospectiva
Exportfinancing
ExportfinancingExportfinancing
Exportfinancing

export financing

Universidad tecnica de ambato
Universidad tecnica de ambatoUniversidad tecnica de ambato
Universidad tecnica de ambato

This document provides biographical information about Walter. It states that he was born in May 1992 in Puyo, Ecuador and grew up there as the first of four children. It lists his parents, Mecias Almendariz who was born in Mocha and Rosa Paguay who was born in Puela. Additionally, it specifies that Walter is currently a fifth semester student studying Industrial Psychology in the faculty of human sciences and education.

HTML5	
  SVG	
  
•  Internet	
  Explorer	
  9+,	
  Firefox,	
  Opera,	
  Chrome,	
  
and	
  Safari	
  support	
  inline	
  SVG.	
  	
  
•  Embed	
  SVG	
  Directly	
  Into	
  HTML	
  Pages	
  
	
  <!DOCTYPE html>
<html>
<body>
<svg xmlns="http://www.w3.org/2000/svg"
version="1.1" height="190">
<polygon points="100,10 40,180 190,60
10,60 160,180"
style="fill:lime;stroke:purple;stroke-
width:5;fill-rule:evenodd;">
</svg>
</body>
</html>
HTML5	
  SVG	
  
•  Differences	
  Between	
  SVG	
  and	
  Canvas	
  
–  SVG	
  is	
  a	
  language	
  for	
  describing	
  2D	
  graphics	
  in	
  XML.	
  
–  Canvas	
  draws	
  2D	
  graphics,	
  on	
  the	
  fly	
  (with	
  a	
  JavaScript).	
  
–  SVG	
  is	
  XML	
  based,	
  which	
  means	
  that	
  every	
  element	
  is	
  available	
  
within	
  the	
  SVG	
  DOM.	
  You	
  can	
  aSach	
  JavaScript	
  event	
  handlers	
  
for	
  an	
  element.	
  
–  In	
  SVG,	
  each	
  drawn	
  shape	
  is	
  remembered	
  as	
  an	
  object.	
  If	
  
aSributes	
  of	
  an	
  SVG	
  object	
  are	
  changed,	
  the	
  browser	
  can	
  
automa4cally	
  re-­‐render	
  the	
  shape.	
  
–  Canvas	
  is	
  rendered	
  pixel	
  by	
  pixel.	
  In	
  canvas,	
  once	
  the	
  graphic	
  is	
  
drawn,	
  it	
  is	
  forgoSen	
  by	
  the	
  browser.	
  If	
  its	
  posi4on	
  should	
  be	
  
changed,	
  the	
  en4re	
  scene	
  needs	
  to	
  be	
  redrawn,	
  including	
  any	
  
objects	
  that	
  might	
  have	
  been	
  covered	
  by	
  the	
  graphic.	
  
HTML5	
  Canvas	
  
HTML5	
  Drag	
  &	
  Drop	
  
•  Drag	
  and	
  drop	
  is	
  a	
  part	
  of	
  the	
  HTML5	
  
standard.	
  	
  
•  Drag	
  and	
  drop	
  is	
  a	
  very	
  common	
  feature.	
  It	
  is	
  
when	
  you	
  "grab"	
  an	
  object	
  and	
  drag	
  it	
  to	
  a	
  
different	
  loca4on.	
  
•  In	
  HTML5,	
  drag	
  and	
  drop	
  is	
  part	
  of	
  the	
  
standard,	
  and	
  any	
  element	
  can	
  be	
  draggable.	
  
•  Internet	
  Explorer	
  9+,	
  Firefox,	
  Opera,	
  Chrome,	
  
and	
  Safari	
  support	
  drag	
  and	
  drop.	
  

Recommended for you

Bahan ajar ii
Bahan ajar iiBahan ajar ii
Bahan ajar ii

Modul ini membahas tentang merakit komputer pribadi dan mencakup pengenalan sistem komputer, perangkat penyusun komputer, cara merakit komputer, dan pemecahan masalah perakitan komputer. Modul ini berisi materi pembelajaran, video tutorial, dan kuis untuk menguji pemahaman siswa.

C1 study slides
C1 study slidesC1 study slides
C1 study slides

This document provides an overview of key concepts in biology, including what defines life, evolution, and how scientists study life. It discusses that life is defined by cells, use of energy and materials, homeostasis, growth, reproduction, and evolution. Evolution occurs through mutations, genetic variation, and natural selection acting on this variation over generations. Scientists study life at different levels, from molecules to ecosystems, and classify organisms based on evolutionary relationships and characteristics like cell structure, number of cells, and energy acquisition.

Role and responsibilities of an allied health professional
Role and responsibilities of an allied health professionalRole and responsibilities of an allied health professional
Role and responsibilities of an allied health professional

The document outlines the roles and responsibilities of Allied Health Professionals in India. It discusses how Allied Health Professionals play important roles in health promotion, health improvement, and supporting those with long-term conditions or disabilities. It also outlines several guiding principles and standards that Allied Health Professionals must follow, including providing competent, safe care to clients; effective communication and maintaining professional boundaries with clients; and engaging in continuing professional development and practicing within their scope.

HTML5	
  Drag	
  &	
  Drop	
  
<!DOCTYPE HTML>
<html>
<head>
<script>
function allowDrop(ev)
{
ev.preventDefault();
}
function drag(ev)
{
ev.dataTransfer.setData("Text",ev.target.id);
}
function drop(ev)
{
ev.preventDefault();
var data=ev.dataTransfer.getData("Text");
ev.target.appendChild(document.getElementById(data));
}
</script>
</head>
<body>
<div id="div1" ondrop="drop(event)"
ondragover="allowDrop(event)"></div>
<img id="drag1" src="img_logo.gif" draggable="true"
ondragstart="drag(event)" width="336" height="69”>
</body>
</html>
HTML5	
  Geoloca4on	
  
•  HTML5	
  Geoloca4on	
  is	
  used	
  to	
  locate	
  a	
  user's	
  posi4on.	
  
•  The	
  HTML5	
  Geoloca4on	
  API	
  is	
  used	
  to	
  get	
  the	
  
geographical	
  posi4on	
  of	
  a	
  user.	
  
•  Since	
  this	
  can	
  compromise	
  user	
  privacy,	
  the	
  posi4on	
  is	
  
not	
  available	
  unless	
  the	
  user	
  approves	
  it.	
  
•  Browser	
  Support	
  
–  Internet	
  Explorer	
  9+,	
  Firefox,	
  Chrome,	
  Safari	
  and	
  Opera	
  
support	
  Geoloca4on.	
  
–  Note:	
  Geoloca4on	
  is	
  much	
  more	
  accurate	
  for	
  devices	
  with	
  
GPS,	
  like	
  iPhone.	
  
HTML5	
  Geoloca4on	
  
<script>
var x=document.getElementById("demo");
function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition);
}
else
{
x.innerHTML="Geolocation is not supported by this
browser.";
}
}
function showPosition(position)
{
x.innerHTML="Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>
HTML5	
  Geoloca4on	
  
function showError(error)
{
switch(error.code)
{
case error.PERMISSION_DENIED:
x.innerHTML="User denied the request for Geolocation."
break;
case error.POSITION_UNAVAILABLE:
x.innerHTML="Location information is unavailable."
break;
case error.TIMEOUT:
x.innerHTML="The request to get user location timed out."
break;
case error.UNKNOWN_ERROR:
x.innerHTML="An unknown error occurred."
break;
}
}

Recommended for you

Search Engine Optimization
Search Engine OptimizationSearch Engine Optimization
Search Engine Optimization

This document discusses search engine optimization (SEO) and provides details on an SEO strategy and implementation plan. The strategy involves on-page optimization such as keyword research, meta tag optimization, and content optimization. It also involves off-page optimization activities like article submission, social bookmarking and directory submission. A multi-month implementation schedule is provided that outlines specific on-page and off-page optimization tasks to be completed each month. Technical testing of the website is also recommended to analyze SEO factors and identify areas for improvement.

optimizationsearch engine optimizationgoogle
Preparing foods with nutrition and safety in mind
Preparing foods with nutrition and safety in mindPreparing foods with nutrition and safety in mind
Preparing foods with nutrition and safety in mind

Proper food handling and preparation techniques can maximize the nutrient quality and flavors of foods. Specifically: - Washing all fresh fruits and vegetables with cool tap water while avoiding soaking helps retain vitamins. - Leaving edible skins on and trimming as little as possible preserves vitamins and minerals found in outer layers. - Quickly cooking vegetables until just tender-crisp minimizes heat-related nutrient destruction. - Microwaving and steaming foods retains nutrients by reducing cooking times and avoiding nutrient-leaching cooking water.

Food safety and hygiene
Food safety and hygieneFood safety and hygiene
Food safety and hygiene

This training presentation educates food handlers on food safety and hygiene. It summarizes that foodborne diseases kill over 2 million people annually. Food can be contaminated by physical, chemical, or microbiological hazards like bacteria, which need specific conditions like water, food, temperature and time to multiply rapidly and cause food poisoning. Common sources of food poisoning bacteria are food handlers, raw foods, pests, air, and dirt. Proper temperature control and avoiding cross-contamination are important to prevent bacterial growth. Thorough cleaning, pest control, personal hygiene, and safe food handling practices are essential to ensuring food safety.

HTML5	
  Geoloca4on	
  
•  Displaying	
  the	
  result	
  in	
  a	
  map	
  
	
  
function showPosition(position)
{
var latlon=position.coords.latitude
+","+position.coords.longitude;
var img_url="http://maps.googleapis.com/maps/api/
staticmap?center="
+latlon+"&zoom=14&size=400x300&sensor=false";
document.getElementById("mapholder").innerHTML="<img
src='"+img_url+"'>";
}
HTML5	
  Video	
  
•  Many	
  modern	
  websites	
  show	
  videos.	
  HTML5	
  provides	
  a	
  
standard	
  for	
  showing	
  them.	
  	
  
•  Un4l	
  now,	
  there	
  has	
  not	
  been	
  a	
  standard	
  for	
  showing	
  a	
  
video/movie	
  on	
  a	
  web	
  page.	
  
•  Today,	
  most	
  videos	
  are	
  shown	
  through	
  a	
  plug-­‐in	
  (like	
  flash).	
  
However,	
  different	
  browsers	
  may	
  have	
  different	
  plug-­‐ins.	
  
•  HTML5	
  defines	
  a	
  new	
  element	
  which	
  specifies	
  a	
  standard	
  
way	
  to	
  embed	
  a	
  video/movie	
  on	
  a	
  web	
  page:	
  the	
  <video>	
  
element.	
  
•  Internet	
  Explorer	
  9+,	
  Firefox,	
  Opera,	
  Chrome,	
  and	
  Safari	
  
support	
  the	
  <video>	
  element.	
  
–  Note:	
  Internet	
  Explorer	
  8	
  and	
  earlier	
  versions,	
  do	
  not	
  support	
  
the	
  <video>	
  element.	
  
HTML5	
  Video	
  
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
HTML5	
  Video	
  
<!DOCTYPE html>
<html>
<body>
<script>
var myVideo=document.getElementById("video1");
function playPause()
{
if (myVideo.paused)
myVideo.play();
else
myVideo.pause();
}
function makeBig()
{
myVideo.width=560;
}
function makeSmall()
{
myVideo.width=320;
}
function makeNormal()
{
myVideo.width=420;
}
</script>
</body>
</html>

Recommended for you

Genres Of Music During Spanish Time
Genres Of Music During Spanish TimeGenres Of Music During Spanish Time
Genres Of Music During Spanish Time

The document summarizes music genres and forms from the pre-Spanish and Spanish periods in the Philippines. It describes that pre-Spanish music was simple with two-note melodies and recitative styles. Examples included dal-lot, pamulinawen, and dung-aw. During the Spanish period, sacred music became more conservative while secular forms like kumintang, awit, and balitaw emerged and were influenced by Spanish musical traditions. The kundiman was a traditional love song and serenade, while the harana was a courting tradition where men would sing love songs to women.

2.ky nang lang nghe hvkt
2.ky nang lang nghe hvkt2.ky nang lang nghe hvkt
2.ky nang lang nghe hvkt

kỹ năng giao tếp trong kế toán

kỹ năng giao tiếp
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development

HTML5 is the next generation web development standard that improves upon HTML4 and XHTML. It focuses on features rather than syntax, and includes new elements like <article> and <section>, native audio/video support, drawing APIs, geolocation, drag and drop, web forms 2.0, and more. HTML5 aims to improve multimedia capabilities while keeping code readable by humans and machines. It is supported by all major browsers, though support for specific features may vary, and polyfills can help with backwards compatibility.

html5web 2.0audio
HTML5	
  Audio	
  
•  HTML5	
  provides	
  a	
  standard	
  for	
  playing	
  audio	
  files.	
  
•  Un4l	
  now,	
  there	
  has	
  not	
  been	
  a	
  standard	
  for	
  playing	
  audio	
  
files	
  on	
  a	
  web	
  page.	
  
•  Today,	
  most	
  audio	
  files	
  are	
  played	
  through	
  a	
  plug-­‐in	
  (like	
  
flash).	
  However,	
  different	
  browsers	
  may	
  have	
  different	
  
plug-­‐ins.	
  
•  HTML5	
  defines	
  a	
  new	
  element	
  which	
  specifies	
  a	
  standard	
  
way	
  to	
  embed	
  an	
  audio	
  file	
  on	
  a	
  web	
  page:	
  the	
  <audio>	
  
element.	
  
•  Internet	
  Explorer	
  9+,	
  Firefox,	
  Opera,	
  Chrome,	
  and	
  Safari	
  
support	
  the	
  <audio>	
  element.	
  
–  Note:	
  Internet	
  Explorer	
  8	
  and	
  earlier	
  versions,	
  do	
  not	
  support	
  
the	
  <audio>	
  element.	
  
HTML5	
  Audio	
  
•  HTML5	
  Audio	
  –	
  How	
  it	
  Works	
  
	
   <audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/
mpeg">
Your browser does not support the audio
element.
</audio>
HTML5	
  Audio	
  
HTML5	
  Input	
  Types	
  
•  HTML5	
  has	
  several	
  new	
  input	
  types	
  for	
  forms.	
  These	
  new	
  features	
  allow	
  beSer	
  
input	
  control	
  and	
  valida4on.	
  
–  color	
  
–  date	
  
–  date4me	
  
–  date4me-­‐local	
  
–  email	
  
–  month	
  
–  number	
  
–  range	
  
–  search	
  
–  tel	
  
–  4me	
  
–  url	
  
–  week	
  
•  Note:	
  Not	
  all	
  major	
  browsers	
  support	
  all	
  the	
  new	
  input	
  types.	
  However,	
  you	
  can	
  
already	
  start	
  using	
  them;	
  If	
  they	
  are	
  not	
  supported,	
  they	
  will	
  behave	
  as	
  regular	
  
text	
  fields.	
  

Recommended for you

WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx

This document provides an overview of fundamentals of web development including HTML, CSS, JavaScript, and frameworks. It covers topics such as the importance of web development, differences between web designers and developers, front-end and back-end development, and introductions to HTML, CSS, JavaScript, jQuery, and advanced web development topics. The document aims to provide learners with knowledge to develop interactive websites using core web technologies.

web development
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS

This PPT is about my best friends, HTML, CSS and JS. Here I am just talk/show few features of them. all three combined make our web site more powerful in this WWW world.

cascading style sheetshtml5css3
web development
web developmentweb development
web development

This document provides an overview of fundamentals of web development including HTML, CSS, JavaScript, and frameworks like jQuery and React. It discusses the importance of web development and differences between web designers and developers. It also explains front-end and back-end development, provides descriptions of HTML, CSS, and JavaScript, and covers additional topics like hosting, DOM, and CSS3 transformations.

HTML5	
  Form	
  Elements	
  
•  HTML5	
  has	
  the	
  following	
  new	
  form	
  elements:	
  
– <datalist>	
  
– <keygen>	
  
– <output>	
  
•  Note:	
  Not	
  all	
  major	
  browsers	
  support	
  all	
  the	
  
new	
  form	
  elements.	
  However,	
  you	
  can	
  already	
  
start	
  using	
  them;	
  If	
  they	
  are	
  not	
  supported,	
  
they	
  will	
  behave	
  as	
  regular	
  text	
  fields.	
  
HTML5	
  Form	
  Elements	
  
•  <datalist>	
  
– HTML5	
  <datalist>	
  Element	
  
– The	
  <datalist>	
  element	
  specifies	
  a	
  list	
  of	
  pre-­‐
defined	
  op4ons	
  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	
  
op4ons	
  as	
  they	
  input	
  data.	
  
– Use	
  the	
  <input>	
  element's	
  list	
  aSribute	
  to	
  bind	
  it	
  
together	
  with	
  a	
  <datalist>	
  element.	
  
HTML5	
  Form	
  Elements	
  
<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
HTML5	
  Form	
  Elements	
  
•  <keygen>	
  
–  The	
  purpose	
  of	
  the	
  <keygen>	
  element	
  is	
  to	
  provide	
  a	
  
secure	
  way	
  to	
  authen4cate	
  users.	
  
–  The	
  <keygen>	
  tag	
  specifies	
  a	
  key-­‐pair	
  generator	
  field	
  
in	
  a	
  form.	
  
–  When	
  the	
  form	
  is	
  submiSed,	
  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	
  cer4ficate	
  to	
  authen4cate	
  the	
  user	
  
in	
  the	
  future.	
  

Recommended for you

HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview

HTML 5 is the latest version of the HTML standard. It includes several new elements and features to improve structure and behavior. Some key changes include new semantic elements like <article>, <aside>, <header>, and <footer>; built-in support for audio and video; the <canvas> element for drawing graphics; and forms with new input types. HTML 5 aims to simplify HTML and separate structure and presentation, making code cleaner and pages more accessible. It is developed jointly by the WHATWG and W3C organizations.

phppaideguaphphtml5
Wordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebWordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The Nextweb

HTML5 is a draft specification from the W3C that adds new elements like canvas, video and audio to HTML and changes some older elements. It is not yet finalized and continues to evolve. HTML5 allows embedding multimedia like video without plugins through new elements like <video> and <audio>. It also introduces new canvas element for drawing 2D graphics and SVG for vector graphics. HTML5 supports local storage and geolocation in the browser.

css 3.0html5ie
Introduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxIntroduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptx

Introduction to HTML language Web design

HTML5	
  Form	
  Elements	
  
<form action="demo_keygen.asp" method="get">
Username: <input type="text" name="usr_name">
Encryption: <keygen name="security">
<input type="submit">
</form>
HTML5	
  Form	
  Elements	
  
•  <output>	
  
– The	
  <output>	
  element	
  represents	
  the	
  result	
  of	
  a	
  
calcula4on	
  (like	
  one	
  performed	
  by	
  a	
  script).	
  	
  
	
  
<form oninput="x.value=parseInt(a.value)
+parseInt(b.value)">0
<input type="range" id="a" value="50">100 +
<input type="number" id="b" value="50">=
<output name="x" for="a b"></output>
</form>
HTML5	
  New	
  Form	
  Elements	
  
•  HTML5	
  has	
  several	
  new	
  aSributes	
  for	
  <form>	
  and	
  <input>.	
  
•  New	
  aSributes	
  for	
  <form>:	
  
–  autocomplete	
  
–  Novalidate	
  
•  New	
  aSributes	
  for	
  <input>:	
  
–  autocomplete	
  
–  autofocus	
  
–  form	
  
–  formac4on	
  
–  formenctype	
  
–  formmethod	
  
–  formnovalidate	
  
–  formtarget	
  
–  height	
  and	
  width	
  
–  list	
  
–  min	
  and	
  max	
  
–  mul4ple	
  
–  paSern	
  (regexp)	
  
–  placeholder	
  
–  required	
  
–  step	
  
HTML5	
  Seman4c	
  Elements	
  
•  What	
  Are	
  Seman4c	
  Elements?	
  
– A	
  seman4c	
  element	
  clearly	
  describes	
  its	
  meaning	
  
to	
  both	
  the	
  browser	
  and	
  the	
  developer.	
  
– Examples	
  of	
  non-­‐seman4c	
  elements:	
  <div>	
  and	
  
<span>	
  -­‐	
  Tells	
  nothing	
  about	
  its	
  content.	
  
– Examples	
  of	
  seman4c	
  elements:	
  <form>,	
  <table>,	
  
and	
  <img>	
  -­‐	
  Clearly	
  defines	
  its	
  content.	
  
– Internet	
  Explorer	
  9+,	
  Firefox,	
  Chrome,	
  Safari	
  and	
  
Opera	
  supports	
  the	
  seman4c	
  elements	
  described	
  
in	
  this	
  chapter.	
  

Recommended for you

25444215.pptx
25444215.pptx25444215.pptx
25444215.pptx

The document provides an overview of fundamentals of web development, including: - The importance of web development for businesses to connect with customers online. - The differences between web designers and developers, emphasizing the skills needed for front-end development. - An introduction to front-end technologies like HTML, CSS, and JavaScript for structuring, styling and adding interactivity to web pages. - Frameworks like jQuery that simplify client-side scripting and dynamic content on websites.

it s rih
web development
web developmentweb development
web development

The document provides an overview of fundamentals of web development including: - The importance of web development for businesses to connect with customers online. - The differences between web designers and developers and the skills required for each. - An introduction to front-end and back-end web development. - Overviews of HTML, CSS, JavaScript, jQuery and other advanced topics.

Demystifying HTML5
Demystifying HTML5Demystifying HTML5
Demystifying HTML5

This document provides an overview and history of HTML5, summarizing some of the key new features in 3 sentences or less: HTML5 aims to simplify HTML markup and make it more semantic with new elements like <section> and <nav>. It also introduces new JavaScript APIs, richer media like <audio> and <video>, and the <canvas> element for drawing. The development of HTML5 was a collaborative effort between browser vendors to create a common standard that is backwards compatible and supports modern web applications.

html5svgcss3
HTML5	
  Seman4c	
  Elements	
  
HTML5	
  Web	
  Storage	
  
•  What	
  is	
  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	
  
affec4ng	
  the	
  website's	
  performance.	
  
–  The	
  data	
  is	
  stored	
  in	
  key/value	
  pairs,	
  and	
  a	
  web	
  page	
  can	
  
only	
  access	
  data	
  stored	
  by	
  itself.	
  
–  Web	
  storage	
  is	
  supported	
  in	
  Internet	
  Explorer	
  8+,	
  Firefox,	
  
Opera,	
  Chrome,	
  and	
  Safari.	
  
HTML5	
  Web	
  Storage	
  
•  localStorage	
  and	
  sessionStorage	
  
– There	
  are	
  two	
  new	
  objects	
  for	
  storing	
  data	
  on	
  the	
  
client:	
  
•  localStorage	
  -­‐	
  stores	
  data	
  with	
  no	
  expira4on	
  date	
  
•  sessionStorage	
  -­‐	
  stores	
  data	
  for	
  one	
  session	
  
– Before	
  using	
  web	
  storage,	
  check	
  browser	
  support	
  
for	
  localStorage	
  and	
  sessionStorage:	
  	
  
if(typeof(Storage)!=="undefined")
{
// Yes! localStorage and sessionStorage support!
// Some code.....
}
else
{
// Sorry! No web storage support..
}
HTML5	
  Web	
  Storage	
  
•  The	
  localStorage	
  Object	
  
– The	
  localStorage	
  object	
  stores	
  the	
  data	
  with	
  no	
  
expira4on	
  date.	
  The	
  data	
  will	
  not	
  be	
  deleted	
  when	
  
the	
  browser	
  is	
  closed,	
  and	
  will	
  be	
  available	
  the	
  
next	
  day,	
  week,	
  or	
  year.	
  
	
  	
  
localStorage.lastname="Smith";
document.getElementById("result").innerHTML
="Last name: "
+ localStorage.lastname;

Recommended for you

Html5
Html5Html5
Html5

HTML5 introduces several new features including new semantic elements, support for embedded video and audio, canvas element for 2D/3D graphics, offline web applications, and drag and drop. It also removes some older HTML elements. HTML5 is still a work in progress but is supported by all major browsers. It aims to make web pages more compatible with new technologies and reduce the need for browser plug-ins.

html5 new elements
Html5
Html5Html5
Html5

HTML5 is a new version of HTML that includes new elements, forms, audio/video playback, drawing, and more. It can be used to build dynamic UIs and web applications. The speaker will provide an introduction to HTML5, demonstrate new elements like <canvas> and audio/video playback, discuss browser support, and provide tutorials and live demos.

htmlshaify mehtashaify
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development

This slideshow provides an introduction to HTML5. The target audience should have an understanding of web development, javascript, and previous standards of HTML. This tutorial contains a brief background on the language and an overview of the most popular features. Features covered include native audio/video support, geolocation, canvas, drawing API, web forms 2.0, drag and drop, and more. Also covered is backwards compatibility and section 508 compliance. Extras include polyfills, modernizr, and a brief introduction to CSS3. Enjoy!

audiocanvascss
HTML5	
  Web	
  Storage	
  
•  The	
  sessionStorage	
  Object	
  
– 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.	
  	
  
if (sessionStorage.clickcount)
{
sessionStorage.clickcount=Number(sessionStorage.clickcount)+1;
}
else
{
sessionStorage.clickcount=1;
}
document.getElementById("result").innerHTML="You have clicked
the button " + sessionStorage.clickcount + " time(s) in this
session.";
HTML5	
  Applica4on	
  Cache	
  
•  With	
  HTML5	
  it	
  is	
  easy	
  to	
  make	
  an	
  offline	
  version	
  of	
  a	
  
web	
  applica4on,	
  by	
  crea4ng	
  a	
  cache	
  manifest	
  file.	
  	
  
•  HTML5	
  introduces	
  applica4on	
  cache,	
  which	
  means	
  that	
  
a	
  web	
  applica4on	
  is	
  cached,	
  and	
  accessible	
  without	
  an	
  
internet	
  connec4on.	
  
•  Applica4on	
  cache	
  gives	
  an	
  applica4on	
  three	
  
advantages:	
  
–  Offline	
  browsing	
  -­‐	
  users	
  can	
  use	
  the	
  applica4on	
  when	
  
they're	
  offline	
  
–  Speed	
  -­‐	
  cached	
  resources	
  load	
  faster	
  
–  Reduced	
  server	
  load	
  -­‐	
  the	
  browser	
  will	
  only	
  download	
  
updated/changed	
  resources	
  from	
  the	
  server	
  
HTML5	
  Applica4on	
  Cache	
  
<!DOCTYPE HTML>
<html manifest="demo.appcache">
<body>
The content of the document......
</body>
</html>
CACHE MANIFEST
/theme.css
/logo.gif
/main.js
CACHE MANIFEST
/theme.css
/logo.gif
/main.js
FALLBACK:
/html/ /offline.html
HTML5	
  Web	
  Workers	
  
•  A	
  web	
  worker	
  is	
  a	
  JavaScript	
  running	
  in	
  the	
  
background,	
  without	
  affec4ng	
  the	
  performance	
  of	
  the	
  
page.	
  
•  When	
  execu4ng	
  scripts	
  in	
  an	
  HTML	
  page,	
  the	
  page	
  
becomes	
  unresponsive	
  un4l	
  the	
  script	
  is	
  finished.	
  
•  A	
  web	
  worker	
  is	
  a	
  JavaScript	
  that	
  runs	
  in	
  the	
  
background,	
  independently	
  of	
  other	
  scripts,	
  without	
  
affec4ng	
  the	
  performance	
  of	
  the	
  page.	
  You	
  can	
  
con4nue	
  to	
  do	
  whatever	
  you	
  want:	
  clicking,	
  selec4ng	
  
things,	
  etc.,	
  while	
  the	
  web	
  worker	
  runs	
  in	
  the	
  
background.	
  

Recommended for you

Html 5
Html 5Html 5
Html 5

This document provides an introduction and overview of HTML5. It discusses the new features and elements in HTML5, including video/audio, canvas, drag and drop, geolocation, web storage, web workers, and new form elements. It also covers browser support for various HTML5 features and provides examples of how to implement many of the new technologies.

Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web Development

This document provides an introduction and overview of frontend web development. It begins with the author's background and experience in web development. It then includes a table of contents listing topics to be covered such as HTML5, CSS3, JavaScript, jQuery, and why someone would want to become a web developer. The document proceeds to define frontend web development and provide a brief history of its development from Tim Berners-Lee's initial work creating HTML and the first web browser in the 1980s to the modernization and standardization of HTML5. It covers technical skills used in frontend development and provides examples of using HTML, CSS, and JavaScript to manipulate web page content and layout. In closing, it discusses the prospects and flexibility of working as

HTML5_elementos nuevos integrados ahora
HTML5_elementos  nuevos integrados ahoraHTML5_elementos  nuevos integrados ahora
HTML5_elementos nuevos integrados ahora

Nuevas actualizaciones etiquetas HTML

html5
HTML5	
  Web	
  Workers	
  
<p>Count numbers: <output id="result"></output></p>
<button onclick="startWorker()">Start Worker</button>
<button onclick="stopWorker()">Stop Worker</button>
<br><br>
<script>
var w;
function startWorker()
{
if(typeof(Worker)!=="undefined")
{
if(typeof(w)=="undefined")
{
w=new Worker("demo_workers.js");
}
w.onmessage = function (event) {
document.getElementById("result").innerHTML=event.data;
};
}
else
{
document.getElementById("result").innerHTML="Sorry, your browser does not
support Web Workers...";
}
}
function stopWorker()
{
w.terminate();
}
</script>
HTML5	
  Web	
  Workers	
  
var i=0;
function timedCount()
{
i=i+1;
postMessage(i);
setTimeout("timedCount()",500);
}
timedCount();
Demo_workers.js	
  
Html5
QUESTIONS?	
  

Recommended for you

A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3

The document provides an overview of HTML5 and CSS3 features for a presentation. It begins by introducing the presenter and their experience with WordPress, HTML, and CSS. It then covers new elements in HTML5 like video, audio, forms, and semantics. For CSS3, it discusses selectors, properties and fonts. The presenter notes they will focus on useful features they commonly use and not cover everything due to time constraints. They ask for questions and indicate they are still learning.

web standardsweb designhtml5
What is HTML5
What is HTML5What is HTML5
What is HTML5

HTML5 provides richer semantics and improved compatibility compared to previous versions of HTML. It allows for richer internet applications through features like multimedia, graphics, offline web applications, web workers and device APIs. HTML5 aims to improve the web experience across browsers and devices.

html5javascript
Html 5
Html 5Html 5
Html 5

HTML5 is the newest version of HTML that adds new semantic elements, built-in audio and video playback, and features like the canvas element for drawing graphics. It simplifies the syntax of earlier HTML versions and aims to make web pages more semantic, reduce the need for plugins, and work across devices. New elements in HTML5 include <header>, <footer>, <nav>, <video>, <audio>, <canvas>, and new form input types. It is still a work in progress with partial browser support.

html 5

More Related Content

What's hot

Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
Guillaume Kossi
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
Jamshid Hashimi
 
JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3
Helder da Rocha
 
Next generation Graphics: SVG
Next generation Graphics: SVGNext generation Graphics: SVG
Next generation Graphics: SVG
David Corbacho Román
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
Gonzalo Cordero
 
SVG - Scalable Vector Graphic
SVG - Scalable Vector GraphicSVG - Scalable Vector Graphic
SVG - Scalable Vector Graphic
Akila Iroshan
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
Lohith Goudagere Nagaraj
 
Learn svg
Learn svgLearn svg
Learn svg
FitBlar Mit
 
WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)
Shumpei Shiraishi
 
SilverlightDevIntro
SilverlightDevIntroSilverlightDevIntro
SilverlightDevIntro
Pratik Aggarwal
 
Html5 public
Html5 publicHtml5 public
Html5 public
doodlemoonch
 
Svg
SvgSvg
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
François Massart
 
Css
CssCss
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
Avi Kedar
 
Accessibility Hacks version 2
Accessibility Hacks version 2Accessibility Hacks version 2
Accessibility Hacks version 2
Graham Armfield
 
The Future Of CSS
The Future Of CSSThe Future Of CSS
The Future Of CSS
Andy Budd
 
HTML5: Introduction
HTML5: IntroductionHTML5: Introduction
HTML5: Introduction
Guillermo Paz
 
Accessibility Hacks Wordcamp Manchester October 2018
Accessibility Hacks Wordcamp Manchester October 2018Accessibility Hacks Wordcamp Manchester October 2018
Accessibility Hacks Wordcamp Manchester October 2018
Graham Armfield
 

What's hot (19)

Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
 
JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3
 
Next generation Graphics: SVG
Next generation Graphics: SVGNext generation Graphics: SVG
Next generation Graphics: SVG
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
 
SVG - Scalable Vector Graphic
SVG - Scalable Vector GraphicSVG - Scalable Vector Graphic
SVG - Scalable Vector Graphic
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
 
Learn svg
Learn svgLearn svg
Learn svg
 
WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)
 
SilverlightDevIntro
SilverlightDevIntroSilverlightDevIntro
SilverlightDevIntro
 
Html5 public
Html5 publicHtml5 public
Html5 public
 
Svg
SvgSvg
Svg
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
Css
CssCss
Css
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Accessibility Hacks version 2
Accessibility Hacks version 2Accessibility Hacks version 2
Accessibility Hacks version 2
 
The Future Of CSS
The Future Of CSSThe Future Of CSS
The Future Of CSS
 
HTML5: Introduction
HTML5: IntroductionHTML5: Introduction
HTML5: Introduction
 
Accessibility Hacks Wordcamp Manchester October 2018
Accessibility Hacks Wordcamp Manchester October 2018Accessibility Hacks Wordcamp Manchester October 2018
Accessibility Hacks Wordcamp Manchester October 2018
 

Viewers also liked

Retirement income
Retirement incomeRetirement income
Retirement income
Xin Luo, CFA
 
The south after the civil war
The south after the civil warThe south after the civil war
The south after the civil war
AMSchnur
 
Prospectiva
ProspectivaProspectiva
Prospectiva
jarmendipg
 
Exportfinancing
ExportfinancingExportfinancing
Exportfinancing
Kiruthika Ekambaram
 
Universidad tecnica de ambato
Universidad tecnica de ambatoUniversidad tecnica de ambato
Universidad tecnica de ambato
Moiss Almendariz
 
Bahan ajar ii
Bahan ajar iiBahan ajar ii
Bahan ajar ii
T Fachrurrazi Jacob
 
C1 study slides
C1 study slidesC1 study slides
C1 study slides
lawrencembio
 
Role and responsibilities of an allied health professional
Role and responsibilities of an allied health professionalRole and responsibilities of an allied health professional
Role and responsibilities of an allied health professional
Nasreen Begum
 
Search Engine Optimization
Search Engine OptimizationSearch Engine Optimization
Search Engine Optimization
Viplove Saini
 
Preparing foods with nutrition and safety in mind
Preparing foods with nutrition and safety in mindPreparing foods with nutrition and safety in mind
Preparing foods with nutrition and safety in mind
Nasreen Begum
 
Food safety and hygiene
Food safety and hygieneFood safety and hygiene
Food safety and hygiene
Nasreen Begum
 
Genres Of Music During Spanish Time
Genres Of Music During Spanish TimeGenres Of Music During Spanish Time
Genres Of Music During Spanish Time
teruzmo_647
 
2.ky nang lang nghe hvkt
2.ky nang lang nghe hvkt2.ky nang lang nghe hvkt
2.ky nang lang nghe hvkt
Thành Bôn
 

Viewers also liked (13)

Retirement income
Retirement incomeRetirement income
Retirement income
 
The south after the civil war
The south after the civil warThe south after the civil war
The south after the civil war
 
Prospectiva
ProspectivaProspectiva
Prospectiva
 
Exportfinancing
ExportfinancingExportfinancing
Exportfinancing
 
Universidad tecnica de ambato
Universidad tecnica de ambatoUniversidad tecnica de ambato
Universidad tecnica de ambato
 
Bahan ajar ii
Bahan ajar iiBahan ajar ii
Bahan ajar ii
 
C1 study slides
C1 study slidesC1 study slides
C1 study slides
 
Role and responsibilities of an allied health professional
Role and responsibilities of an allied health professionalRole and responsibilities of an allied health professional
Role and responsibilities of an allied health professional
 
Search Engine Optimization
Search Engine OptimizationSearch Engine Optimization
Search Engine Optimization
 
Preparing foods with nutrition and safety in mind
Preparing foods with nutrition and safety in mindPreparing foods with nutrition and safety in mind
Preparing foods with nutrition and safety in mind
 
Food safety and hygiene
Food safety and hygieneFood safety and hygiene
Food safety and hygiene
 
Genres Of Music During Spanish Time
Genres Of Music During Spanish TimeGenres Of Music During Spanish Time
Genres Of Music During Spanish Time
 
2.ky nang lang nghe hvkt
2.ky nang lang nghe hvkt2.ky nang lang nghe hvkt
2.ky nang lang nghe hvkt
 

Similar to Html5

HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
silvers5
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
Naga Harish M
 
web development
web developmentweb development
web development
RamanDeep876641
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
Marcelio Leal
 
Wordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebWordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The Nextweb
George Kanellopoulos
 
Introduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxIntroduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptx
lekhacce
 
25444215.pptx
25444215.pptx25444215.pptx
25444215.pptx
YashMittal302244
 
web development
web developmentweb development
web development
ABHISHEKJHA176786
 
Demystifying HTML5
Demystifying HTML5Demystifying HTML5
Demystifying HTML5
Sergejus Barinovas
 
Html5
Html5Html5
Html5
mikusuraj
 
Html5
Html5Html5
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
Html 5
Html 5Html 5
Html 5
Nguyen Quang
 
Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web Development
Daryll Chu
 
HTML5_elementos nuevos integrados ahora
HTML5_elementos  nuevos integrados ahoraHTML5_elementos  nuevos integrados ahora
HTML5_elementos nuevos integrados ahora
mano21161
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
Darren Wood
 
What is HTML5
What is HTML5What is HTML5
What is HTML5
Kyohei Morimoto
 
Html 5
Html 5Html 5
025444215.pptx
025444215.pptx025444215.pptx
025444215.pptx
RiyaJenner1
 

Similar to Html5 (20)

HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
 
web development
web developmentweb development
web development
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
Wordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebWordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The Nextweb
 
Introduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxIntroduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptx
 
25444215.pptx
25444215.pptx25444215.pptx
25444215.pptx
 
web development
web developmentweb development
web development
 
Demystifying HTML5
Demystifying HTML5Demystifying HTML5
Demystifying HTML5
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
 
Html 5
Html 5Html 5
Html 5
 
Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web Development
 
HTML5_elementos nuevos integrados ahora
HTML5_elementos  nuevos integrados ahoraHTML5_elementos  nuevos integrados ahora
HTML5_elementos nuevos integrados ahora
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
 
What is HTML5
What is HTML5What is HTML5
What is HTML5
 
Html 5
Html 5Html 5
Html 5
 
025444215.pptx
025444215.pptx025444215.pptx
025444215.pptx
 

Recently uploaded

Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Bert Blevins
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 

Recently uploaded (20)

Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 

Html5

  • 1. HTML5   Mehdi  Jalal   Trainer:  Cresco  Solu4on   So5ware  Developer:  NETLINKS   Email:  mehdi@netlinks.af   Skype:  mehdijalal01               Afghanistan  Workforce   Development  Program      
  • 3. Agenda   •  HTML5  Introduc4on   •  HTML5  New  Elements   •  HTML5  Canvas   •  HTML5  SVG   •  HTML5  Drag/Drop   •  HTML5  Geoloca4on   •  HTML5  Video   •  HTML5  Audio   •  HTML5  Input  Types  
  • 4. Agenda   •  HTML5  Form  Elements   •  HTML5  Form  ASributes   •  HTML5  Seman4c  Elements   •  HMTL5  Web  Storage   •  HMTL5  Applica4on  Cache   •  HMTL5  Web  Workers  
  • 5. HTML5  Introduc4on   •  What  is  HTML5?   – HTML5  will  be  the  standard  for  HTML   – HTML  4.01  came  in  1999.  Web  changed  a  lot!   – HTML5  is  s4ll  work  in  progress   – Major  browsers  support  HTML5  elements  &  API   •  How  Did  HTML5  Get  Started?   – Coopera4on  between  World  Wide  Web   Consor4um  (W3C)  and  Web  Hypertext  Applica4on   Technology  Working  Group  (WHATWG)  
  • 6. HTML5  Introduc4on   •  The  HTML5  <!DOCTYPE>   – There  is  only  one  <!DOCTYPE>  declara4on.  Simple       <!DOCTYPE html>
  • 7. HTML5  Introduc4on   •  Minimum  HTML5  Document     <!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> The content of the document...... </body> </html>
  • 8. HTML5  Introduc4on   •  HTML5  New  Features   – The  <canvas>  element  for  2D  drawing   – The  <video>  and  <audio>  elements  for  media   playback   – Support  for  local  storage   – New  content-­‐specific  elements,  like  <ar4cle>,   <footer>,  <header>,  <nav>,  <sec4on>   – New  form  controls,  like  calendar,  date,  4me,   email,  url,  search  
  • 9. HTML5  Introduc4on   •  Browser  Support  for  HTML5   – Not  full  standard!   – No  browser  has  full  support   – In  a  con4nuous  development  (Chrome,  Safari,   Internet  Explorer,  Firefox,  Opera)    
  • 11. HTML5  New  Elements   •  Use  of  internet  changed  a  lot  since  HTML  4.01   (1999)   •  Several  HTML  4.01  elements  are  obsolete,  never   used  or  never  used  the  way  they  were  intended   •  To  beSer  handle  todays  internet,  HTML5  brings   new  changes:  New  elements  for  drawing   graphics,  adding  media  content,  beSer  page   structure,  beSer  form  handling,  and  several  APIs   to  drag/drop  elements,  find  Geoloca4on,  include   web  storage,  applica4on  cache,  web  workers,   etc.  
  • 17. HTML5  New  Elements   •  Removed  Elements   –  <acronym>   –  <applet>   –  <basefont>   –  <big>   –  <center>   –  <dir>   –  <font>   –  <frame>   –  <frameset>   –  <noframes>   –  <strike>   –  <S>  
  • 18. HTML5  Canvas   •  The  <canvas>  element  is  used  to  draw  graphics,   on  the  fly,  on  a  web  page.   •  What  is  Canvas?   –  The  HTML5  <canvas>  element  is  used  to  draw   graphics,  on  the  fly,  via  scrip4ng  (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,  characters,  and  adding  images.  
  • 19. HTML5  Canvas   •  Browser  Support   – Internet  Explorer  9+,  Firefox,  Opera,  Chrome,  and   Safari  support  the  <canvas>  element.   – Note:  Internet  Explorer  8  and  earlier  versions,  do   not  support  the  <canvas>  element.   •  Crea4ng  a  Canvas   <canvas id="myCanvas" width="200" height="100"></canvas>
  • 20. HTML5  Canvas   •  Tip:  You  can  have  mul4ple  <canvas>  elements   on  one  HTML  page.     •  Canvas  example:     <canvas id="myCanvas" width="200" height="100" style="border:1px solid #000000;"> </canvas>
  • 21. HTML5  Canvas   •  Draw  Onto  The  Canvas  With  Javascript     <script> var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.fillStyle="#FF0000"; ctx.fillRect(0,0,150,75); </script>
  • 22. HTML5  Canvas   •  Canvas  Coordinates   •  This  means:  Start  at  the  upper-­‐le5  corner  (0,0)   and  draw  a  150x75  pixels  rectangle.  
  • 23. HTML5  Canvas   •  Canvas  Paths   – To  draw  straight  lines  on  a  canvas,  we  will  use  the   following  two  methods:   •  moveTo(x,y)  defines  the  star4ng  point  of  the  line   •  lineTo(x,y)  defines  the  ending  point  of  the  line   – To  actually  draw  the  line,  we  must  use  one  of  the   "ink"  methods,  like  stroke().   var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.moveTo(0,0); ctx.lineTo(200,100); ctx.stroke();
  • 24. HTML5  Canvas   •  To  draw  a  circle  on  a  canvas,  we  will  use  the   following  method:   – arc(x,y,r,start,stop)   •  To  actually  draw  the  circle,  we  must  use  one   of  the  "ink"  methods,  like  stroke()  or  fill().    var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.beginPath(); ctx.arc(95,50,40,0,2*Math.PI); ctx.stroke();
  • 25. HTML5  Canvas   •  To  draw  text  on  a  canvas,  the  most  important   property  and  methods  are:   – font  -­‐  defines  the  font  proper4es  for  text   – fillText(text,x,y)  -­‐  Draws  "filled"  text  on  the  canvas   – strokeText(text,x,y)  -­‐  Draws  text  on  the  canvas  (no   fill)   Using  fillText():    var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.font="30px Arial"; ctx.fillText("Hello World",10,50);
  • 26. HTML5  Canvas   Using  strokeText():     var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.font="30px Arial"; ctx.strokeText("Hello World",10,50);
  • 27. HTML5  SVG   •  HTML5  has  support  for  inline  SVG.   •  What  is  SVG?   –  SVG  stands  for  Scalable  Vector  Graphics   –  SVG  is  used  to  define  vector-­‐based  graphics  for  the   Web   –  SVG  defines  the  graphics  in  XML  format   –  SVG  graphics  do  NOT  lose  any  quality  if  they  are   zoomed  or  resized   –  Every  element  and  every  aSribute  in  SVG  files  can  be   animated   –  SVG  is  a  W3C  recommenda4on  
  • 28. HTML5  SVG   •  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   resolu4on   –  SVG  images  are  zoomable  (and  the  image  can  be   zoomed  without  degrada4on)  
  • 29. HTML5  SVG   •  Internet  Explorer  9+,  Firefox,  Opera,  Chrome,   and  Safari  support  inline  SVG.     •  Embed  SVG  Directly  Into  HTML  Pages    <!DOCTYPE html> <html> <body> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="190"> <polygon points="100,10 40,180 190,60 10,60 160,180" style="fill:lime;stroke:purple;stroke- width:5;fill-rule:evenodd;"> </svg> </body> </html>
  • 30. HTML5  SVG   •  Differences  Between  SVG  and  Canvas   –  SVG  is  a  language  for  describing  2D  graphics  in  XML.   –  Canvas  draws  2D  graphics,  on  the  fly  (with  a  JavaScript).   –  SVG  is  XML  based,  which  means  that  every  element  is  available   within  the  SVG  DOM.  You  can  aSach  JavaScript  event  handlers   for  an  element.   –  In  SVG,  each  drawn  shape  is  remembered  as  an  object.  If   aSributes  of  an  SVG  object  are  changed,  the  browser  can   automa4cally  re-­‐render  the  shape.   –  Canvas  is  rendered  pixel  by  pixel.  In  canvas,  once  the  graphic  is   drawn,  it  is  forgoSen  by  the  browser.  If  its  posi4on  should  be   changed,  the  en4re  scene  needs  to  be  redrawn,  including  any   objects  that  might  have  been  covered  by  the  graphic.  
  • 32. HTML5  Drag  &  Drop   •  Drag  and  drop  is  a  part  of  the  HTML5   standard.     •  Drag  and  drop  is  a  very  common  feature.  It  is   when  you  "grab"  an  object  and  drag  it  to  a   different  loca4on.   •  In  HTML5,  drag  and  drop  is  part  of  the   standard,  and  any  element  can  be  draggable.   •  Internet  Explorer  9+,  Firefox,  Opera,  Chrome,   and  Safari  support  drag  and  drop.  
  • 33. HTML5  Drag  &  Drop   <!DOCTYPE HTML> <html> <head> <script> function allowDrop(ev) { ev.preventDefault(); } function drag(ev) { ev.dataTransfer.setData("Text",ev.target.id); } function drop(ev) { ev.preventDefault(); var data=ev.dataTransfer.getData("Text"); ev.target.appendChild(document.getElementById(data)); } </script> </head> <body> <div id="div1" ondrop="drop(event)" ondragover="allowDrop(event)"></div> <img id="drag1" src="img_logo.gif" draggable="true" ondragstart="drag(event)" width="336" height="69”> </body> </html>
  • 34. HTML5  Geoloca4on   •  HTML5  Geoloca4on  is  used  to  locate  a  user's  posi4on.   •  The  HTML5  Geoloca4on  API  is  used  to  get  the   geographical  posi4on  of  a  user.   •  Since  this  can  compromise  user  privacy,  the  posi4on  is   not  available  unless  the  user  approves  it.   •  Browser  Support   –  Internet  Explorer  9+,  Firefox,  Chrome,  Safari  and  Opera   support  Geoloca4on.   –  Note:  Geoloca4on  is  much  more  accurate  for  devices  with   GPS,  like  iPhone.  
  • 35. HTML5  Geoloca4on   <script> var x=document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML="Geolocation is not supported by this browser."; } } function showPosition(position) { x.innerHTML="Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; } </script>
  • 36. HTML5  Geoloca4on   function showError(error) { switch(error.code) { case error.PERMISSION_DENIED: x.innerHTML="User denied the request for Geolocation." break; case error.POSITION_UNAVAILABLE: x.innerHTML="Location information is unavailable." break; case error.TIMEOUT: x.innerHTML="The request to get user location timed out." break; case error.UNKNOWN_ERROR: x.innerHTML="An unknown error occurred." break; } }
  • 37. HTML5  Geoloca4on   •  Displaying  the  result  in  a  map     function showPosition(position) { var latlon=position.coords.latitude +","+position.coords.longitude; var img_url="http://maps.googleapis.com/maps/api/ staticmap?center=" +latlon+"&zoom=14&size=400x300&sensor=false"; document.getElementById("mapholder").innerHTML="<img src='"+img_url+"'>"; }
  • 38. HTML5  Video   •  Many  modern  websites  show  videos.  HTML5  provides  a   standard  for  showing  them.     •  Un4l  now,  there  has  not  been  a  standard  for  showing  a   video/movie  on  a  web  page.   •  Today,  most  videos  are  shown  through  a  plug-­‐in  (like  flash).   However,  different  browsers  may  have  different  plug-­‐ins.   •  HTML5  defines  a  new  element  which  specifies  a  standard   way  to  embed  a  video/movie  on  a  web  page:  the  <video>   element.   •  Internet  Explorer  9+,  Firefox,  Opera,  Chrome,  and  Safari   support  the  <video>  element.   –  Note:  Internet  Explorer  8  and  earlier  versions,  do  not  support   the  <video>  element.  
  • 39. HTML5  Video   <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video>
  • 40. HTML5  Video   <!DOCTYPE html> <html> <body> <script> var myVideo=document.getElementById("video1"); function playPause() { if (myVideo.paused) myVideo.play(); else myVideo.pause(); } function makeBig() { myVideo.width=560; } function makeSmall() { myVideo.width=320; } function makeNormal() { myVideo.width=420; } </script> </body> </html>
  • 41. HTML5  Audio   •  HTML5  provides  a  standard  for  playing  audio  files.   •  Un4l  now,  there  has  not  been  a  standard  for  playing  audio   files  on  a  web  page.   •  Today,  most  audio  files  are  played  through  a  plug-­‐in  (like   flash).  However,  different  browsers  may  have  different   plug-­‐ins.   •  HTML5  defines  a  new  element  which  specifies  a  standard   way  to  embed  an  audio  file  on  a  web  page:  the  <audio>   element.   •  Internet  Explorer  9+,  Firefox,  Opera,  Chrome,  and  Safari   support  the  <audio>  element.   –  Note:  Internet  Explorer  8  and  earlier  versions,  do  not  support   the  <audio>  element.  
  • 42. HTML5  Audio   •  HTML5  Audio  –  How  it  Works     <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/ mpeg"> Your browser does not support the audio element. </audio>
  • 44. HTML5  Input  Types   •  HTML5  has  several  new  input  types  for  forms.  These  new  features  allow  beSer   input  control  and  valida4on.   –  color   –  date   –  date4me   –  date4me-­‐local   –  email   –  month   –  number   –  range   –  search   –  tel   –  4me   –  url   –  week   •  Note:  Not  all  major  browsers  support  all  the  new  input  types.  However,  you  can   already  start  using  them;  If  they  are  not  supported,  they  will  behave  as  regular   text  fields.  
  • 45. HTML5  Form  Elements   •  HTML5  has  the  following  new  form  elements:   – <datalist>   – <keygen>   – <output>   •  Note:  Not  all  major  browsers  support  all  the   new  form  elements.  However,  you  can  already   start  using  them;  If  they  are  not  supported,   they  will  behave  as  regular  text  fields.  
  • 46. HTML5  Form  Elements   •  <datalist>   – HTML5  <datalist>  Element   – The  <datalist>  element  specifies  a  list  of  pre-­‐ defined  op4ons  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   op4ons  as  they  input  data.   – Use  the  <input>  element's  list  aSribute  to  bind  it   together  with  a  <datalist>  element.  
  • 47. HTML5  Form  Elements   <input list="browsers"> <datalist id="browsers"> <option value="Internet Explorer"> <option value="Firefox"> <option value="Chrome"> <option value="Opera"> <option value="Safari"> </datalist>
  • 48. HTML5  Form  Elements   •  <keygen>   –  The  purpose  of  the  <keygen>  element  is  to  provide  a   secure  way  to  authen4cate  users.   –  The  <keygen>  tag  specifies  a  key-­‐pair  generator  field   in  a  form.   –  When  the  form  is  submiSed,  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  cer4ficate  to  authen4cate  the  user   in  the  future.  
  • 49. HTML5  Form  Elements   <form action="demo_keygen.asp" method="get"> Username: <input type="text" name="usr_name"> Encryption: <keygen name="security"> <input type="submit"> </form>
  • 50. HTML5  Form  Elements   •  <output>   – The  <output>  element  represents  the  result  of  a   calcula4on  (like  one  performed  by  a  script).       <form oninput="x.value=parseInt(a.value) +parseInt(b.value)">0 <input type="range" id="a" value="50">100 + <input type="number" id="b" value="50">= <output name="x" for="a b"></output> </form>
  • 51. HTML5  New  Form  Elements   •  HTML5  has  several  new  aSributes  for  <form>  and  <input>.   •  New  aSributes  for  <form>:   –  autocomplete   –  Novalidate   •  New  aSributes  for  <input>:   –  autocomplete   –  autofocus   –  form   –  formac4on   –  formenctype   –  formmethod   –  formnovalidate   –  formtarget   –  height  and  width   –  list   –  min  and  max   –  mul4ple   –  paSern  (regexp)   –  placeholder   –  required   –  step  
  • 52. HTML5  Seman4c  Elements   •  What  Are  Seman4c  Elements?   – A  seman4c  element  clearly  describes  its  meaning   to  both  the  browser  and  the  developer.   – Examples  of  non-­‐seman4c  elements:  <div>  and   <span>  -­‐  Tells  nothing  about  its  content.   – Examples  of  seman4c  elements:  <form>,  <table>,   and  <img>  -­‐  Clearly  defines  its  content.   – Internet  Explorer  9+,  Firefox,  Chrome,  Safari  and   Opera  supports  the  seman4c  elements  described   in  this  chapter.  
  • 54. HTML5  Web  Storage   •  What  is  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   affec4ng  the  website's  performance.   –  The  data  is  stored  in  key/value  pairs,  and  a  web  page  can   only  access  data  stored  by  itself.   –  Web  storage  is  supported  in  Internet  Explorer  8+,  Firefox,   Opera,  Chrome,  and  Safari.  
  • 55. HTML5  Web  Storage   •  localStorage  and  sessionStorage   – There  are  two  new  objects  for  storing  data  on  the   client:   •  localStorage  -­‐  stores  data  with  no  expira4on  date   •  sessionStorage  -­‐  stores  data  for  one  session   – Before  using  web  storage,  check  browser  support   for  localStorage  and  sessionStorage:     if(typeof(Storage)!=="undefined") { // Yes! localStorage and sessionStorage support! // Some code..... } else { // Sorry! No web storage support.. }
  • 56. HTML5  Web  Storage   •  The  localStorage  Object   – The  localStorage  object  stores  the  data  with  no   expira4on  date.  The  data  will  not  be  deleted  when   the  browser  is  closed,  and  will  be  available  the   next  day,  week,  or  year.       localStorage.lastname="Smith"; document.getElementById("result").innerHTML ="Last name: " + localStorage.lastname;
  • 57. HTML5  Web  Storage   •  The  sessionStorage  Object   – 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.     if (sessionStorage.clickcount) { sessionStorage.clickcount=Number(sessionStorage.clickcount)+1; } else { sessionStorage.clickcount=1; } document.getElementById("result").innerHTML="You have clicked the button " + sessionStorage.clickcount + " time(s) in this session.";
  • 58. HTML5  Applica4on  Cache   •  With  HTML5  it  is  easy  to  make  an  offline  version  of  a   web  applica4on,  by  crea4ng  a  cache  manifest  file.     •  HTML5  introduces  applica4on  cache,  which  means  that   a  web  applica4on  is  cached,  and  accessible  without  an   internet  connec4on.   •  Applica4on  cache  gives  an  applica4on  three   advantages:   –  Offline  browsing  -­‐  users  can  use  the  applica4on  when   they're  offline   –  Speed  -­‐  cached  resources  load  faster   –  Reduced  server  load  -­‐  the  browser  will  only  download   updated/changed  resources  from  the  server  
  • 59. HTML5  Applica4on  Cache   <!DOCTYPE HTML> <html manifest="demo.appcache"> <body> The content of the document...... </body> </html> CACHE MANIFEST /theme.css /logo.gif /main.js CACHE MANIFEST /theme.css /logo.gif /main.js FALLBACK: /html/ /offline.html
  • 60. HTML5  Web  Workers   •  A  web  worker  is  a  JavaScript  running  in  the   background,  without  affec4ng  the  performance  of  the   page.   •  When  execu4ng  scripts  in  an  HTML  page,  the  page   becomes  unresponsive  un4l  the  script  is  finished.   •  A  web  worker  is  a  JavaScript  that  runs  in  the   background,  independently  of  other  scripts,  without   affec4ng  the  performance  of  the  page.  You  can   con4nue  to  do  whatever  you  want:  clicking,  selec4ng   things,  etc.,  while  the  web  worker  runs  in  the   background.  
  • 61. HTML5  Web  Workers   <p>Count numbers: <output id="result"></output></p> <button onclick="startWorker()">Start Worker</button> <button onclick="stopWorker()">Stop Worker</button> <br><br> <script> var w; function startWorker() { if(typeof(Worker)!=="undefined") { if(typeof(w)=="undefined") { w=new Worker("demo_workers.js"); } w.onmessage = function (event) { document.getElementById("result").innerHTML=event.data; }; } else { document.getElementById("result").innerHTML="Sorry, your browser does not support Web Workers..."; } } function stopWorker() { w.terminate(); } </script>
  • 62. HTML5  Web  Workers   var i=0; function timedCount() { i=i+1; postMessage(i); setTimeout("timedCount()",500); } timedCount(); Demo_workers.js