SlideShare a Scribd company logo
HTML5 features & JavaScript APIs
Fisnik Doko
Microsoft Certified Trainer / Semos Education
HTML5 features & JavaScript APIs
2
Please Mute your
mobile devices
3
General Sponsors
Platinum Sponsors
Silver Sponsors
Gold Sponsors
Bronze Sponsors
4
Speaker
Fisnik Doko
• MCSD – Web Apps
• MCPD – Web Developer
• MCSE – Data Platform
• MCSA – SQL 2012/2014
• MCTS – Web Forms, Data Access, WCF
• MS – C#, HTML5, MVC, SHP 2013
• MCP, MCT, MSc
• Microsoft Trainer – Semos Education
• Software Developer – NBRM
• Consultant
5
HTML 5 Features
6
HTML 4 VS HTML 5
• You don’t get rid of HTML4 standards – you just improve upon them!
7
Standard Improvements
What's New in HTML5?
HTML5 provides many extensions over previous versions, including:
• Rules for browser vendors
• New elements that reflect modern web application development
• JavaScript APIs that support desktop and mobile application
capabilities
• Each version of HTML has its own DOCTYPE
– The browser uses the DOCTYPE declaration to determine how
to interpret the HTML markup
– For HTML5 pages, specify a DOCTYPE of html
<!DOCTYPE HTML>
8
Document Structure in HTML5
HTML5 provides new elements to define the structure of a web page:
• <section> to divide up main content
• <header> and <footer>
for page headers and footers
• <nav> for navigations links
• <article> for stand-alone content
• <aside> for quotes and sidebar content
• <hgroup>
• <figure> and <figcaption>
• <mark>
9
HTML5 Input Type
• <input type=“range”> - for sliders
• <input type=“color”> - for color pickers
• <input type=“tel”> - for telephone numbers
• <input type=“url”> - for web addresses
• <input type=“email”> - for email addresses
• <input type=“date”> - for calendar date pickers
• <input type=“month”> - for a list of months
• <input type=“week”> - for weeks
• <input type=“time”> - timestamps
• <input type=“datetime”> - for precise, absolute date+time
• <input type=“datetime-local”> - for local dates and times
• <input type=“number”> - for spinboxes
• <input type=“search”> - for search boxes
10
HTML5 Input Attributes
• Input attributes modify the behavior of input types and forms to provide
better feedback and usability:
– autofocus
– autocomplete
– required
– pattern
– placeholder
– many other input type-specific attributes
– Ex. number input type supports the max, min, step, and value attributes
• If the data is not valid, display custom error message by using the
setCustomValidity function
11
Demo
12
Creating Interactive Pages by Using
HTML5 APIs
13
File API
• The HTML5 File API enables a web application to access the local
file system
• There are four key interfaces:
– Blob – immutable raw binary data
– File - read-only information about a file (name, size, type)
– FileList – an array of files
– FileReader – methods for reading data from a file or blob
• The FileReader interface provides methods for reading a file or blob
• FileReader reads data asynchronously and fires events
• File contents are available through the result attribute on the
FileReader object
14
Drag & Drop API
• Allows objects to be dragged and then dropped onto a target.
• HTML5 supports drag-and-drop
– The user can drag HTML elements, or files
from the local file system
– The user can drop items onto drop-enabled
target elements
• To support drag and drop operations
– Enable drag support on HTML elements, if required
– Enable drop support on HTML drop target elements
• Propagation and Prevention
15
Drag Source Drag Target
dragstart
drag dragenter
dragover
dragleave
drop
dragend
HTML5 Audio and Video
• New HTML5 media elements
– <audio> and <video>
• Native audio and video
• Add videos and audio as if it was an image
• Codec support varies, but multiple
source elements and fallback
content can be used
• Complete JavaScript API available
16
<video width="300" height="200"
poster="MyPoster.jpg"
autoplay="autoplay"
muted="muted"
controls="controls"
loop="loop" >
<source src="media/video1.mp4"
type="video/mp4" />
<source src="media/video1.ogv"
type="video/ogg" />
<source src="media/video1.webm"
type="video/webm" />
<object id="flash1" data="Media/Video1.swf"
type="application/x-shockwave-flash">
<param name="movie"
value="Media/Video1.swf">
</object>
</video>
GeoLocation API
• Geolocation interface represents an object able to
programmatically obtain the position of the device
• A host device can use several techniques to obtain geolocation
information:
– IP address
– GPS positioning
– Wi-Fi
– Cell phone location
– User-defined location information
17
navigator.geolocation.getCurrentPosition(myPositionCallbackFunction,
myPositionErrorCallbackFunction,
{enableHighAccuracy: true, timeout: 5000} );
var watchID = navigator.geolocation.watchPosition(myPositionCallbackFunction,
myPositionErrorCallbackFunction,
{enableHighAccuracy: true, maximumAge: 10000} );
Page Visibility API
• Page Visibility API consists of two properties and an event:
– document.hidden property describes whether the page is
visible or not
– The visibilitychange event fires any time the visibility state
of the page changes
• HTML5 allows online and offline detection
• navigator.onLine property, which indicates whether the
browser is online or offline
18
Web Workers
• Web workers enable a web page to move code to a parallel execution
environment, enabling the browser to remain responsive
1. Dedicated web workers
2. Shared web workers
• A web page communicates with a web worker by sending and
receiving messages:
– Send messages by using the postMessage() function
– Receive messages by handling the message event
19
SVG & CANVAS
• 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
• Popular library https://d3js.org/
• The Canvas API enables you to draw onto a bitmap area
– Immediate mode: "fire and forget"
• JavaScript APIs and drawing primitives
– Simple API: 45 methods, 21 attributes
– Rectangles, lines, fills, arcs, Bezier curves, …
• Creating games in HTML5 Canvas
• http://canvasengine.net/
20
Demo
21
Adding Offline Support to Web
Applications
22
Application Cache API
• The application cache manifest file specifies the
resources to cache
• Use complete web sites in offline mode
• Browsers cache data in an Application Cache
• Application cache gives an application three advantages:
– Offline browsing - users can use the application when
they're offline
– Speed - cached resources load faster
– Reduced server load
23
CACHE MANIFEST
# version 2.0
CACHE:
index.html
verification.js
site.css
graphics/logo.jpg
NETWORK:
/login
# alternatives paths
FALLBACK:
/ajax/account/
/noCode.htm
<html manifest=“test.appcache">
Local Storage API - Web Storage
• Local storage is more secure than cookies
• Limit is far larger (at least 5MB) and information is never
transferred to the server
• Local storage is per domain.
• Local storage persists until it is explicitly deleted or the browser’s
cache is cleared.
• Session storage persists until it is explicitly deleted or the browsing
context is closed.
• HTML local storage provides two objects for storing data on the
client:
– window.localStorage - stores data with no expiration date
– window.sessionStorage - stores data for one session
24
Indexed Database API
• IndexedDB provides an efficient means for storing structured data on
the user’s computer
• IndexedDB is a JavaScript-based object-oriented database
• Powerful, but may seem too complicated for simple case
• The API is asynchronous, and includes the following features:
– Multiple object stores
– Transactions
– Indexes to speed up common queries
• For IndexedDB, you can use up to 50MB on desktop
25
Demo
26
XMLHttpRequest, WebSocket
• XMLHttpRequest Level 2 – significantly enhanced
– Cross-origin XMLHttpRequests
– Progress events
– Binary Data
• Web sockets are a solution for implementing real-time
bidirectional communications on the web
• The WebSockets API defines a JavaScript API for code running in
a browser
27
Animating the User Interface
28
Transforming elements
Types of transformation supported by CSS:
– Translating
– Rotating
– Scaling
– Skewing
29
div.rotate1 {
transform: rotate(10deg);
transform-origin: left top;
}
Keyframe Animation
• SWIFFY, GOOGLE WEB DESIGNER, ADOBE EDGE
30
@keyframes name_of_animation {
0% { /* or from */
… properties to at the start of the animation …
}
50% {
… properties to apply after 50% of the animation …
}
100% { /* or to */
… properties to apply at the end of the animation …
}
}
CSS_rule_to_apply_animation {
animation-name: name_of_animation;
animation-duration: duration_of_animation;
…
}
CSS 3
• Media Queries
• border-radius
• box-shadow
• text-shadow
• Linear and radial gradient
• column-width & column-gap
• @font-face
• http://www.css3maker.com/
31
Future
32
Complete the evaluation
and earn the chance to win
prizes in the closing raffle
http://eval.codecamp.mk
33
Questions
Thank you

More Related Content

What's hot (20)

Ajax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web ApplicationsAjax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web Applications
Siva Kumar
 
Drupal is not your Website
Drupal is not your Website Drupal is not your Website
Drupal is not your Website
Phase2
 
The data layer
The data layerThe data layer
The data layer
Ian Holsman
 
Java
JavaJava
Java
BALUJAINSTITUTE
 
Azure Platform
Azure Platform Azure Platform
Azure Platform
Wes Yanaga
 
Building LinkedIn's Learning Platform with MongoDB
Building LinkedIn's Learning Platform with MongoDBBuilding LinkedIn's Learning Platform with MongoDB
Building LinkedIn's Learning Platform with MongoDB
MongoDB
 
Cert05 70-487 - developing microsoft azure and web services
Cert05   70-487 - developing microsoft azure and web servicesCert05   70-487 - developing microsoft azure and web services
Cert05 70-487 - developing microsoft azure and web services
DotNetCampus
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
Ivano Malavolta
 
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
 
Microsoft Web Technology Stack
Microsoft Web Technology StackMicrosoft Web Technology Stack
Microsoft Web Technology Stack
Lushanthan Sivaneasharajah
 
Exciting JavaScript - Part II
Exciting JavaScript - Part IIExciting JavaScript - Part II
Exciting JavaScript - Part II
Eugene Lazutkin
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
Eugene Lazutkin
 
facebook architecture for 600M users
facebook architecture for 600M usersfacebook architecture for 600M users
facebook architecture for 600M users
Jongyoon Choi
 
Caching Strategies for Scaling Drupal: Common Missteps vs Best Practices
Caching Strategies for Scaling Drupal: Common Missteps vs Best PracticesCaching Strategies for Scaling Drupal: Common Missteps vs Best Practices
Caching Strategies for Scaling Drupal: Common Missteps vs Best Practices
Acquia
 
jmp206 - Lotus Domino Web Services Jumpstart
jmp206 - Lotus Domino Web Services Jumpstartjmp206 - Lotus Domino Web Services Jumpstart
jmp206 - Lotus Domino Web Services Jumpstart
Bill Buchan
 
Local Storage for Web Applications
Local Storage for Web ApplicationsLocal Storage for Web Applications
Local Storage for Web Applications
Markku Laine
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
vamsi krishna
 
Migration from Legacy CMS to Drupal
Migration from Legacy CMS to DrupalMigration from Legacy CMS to Drupal
Migration from Legacy CMS to Drupal
Rachel Jaro
 
Asp.net
Asp.netAsp.net
Asp.net
KIRTI PRADHAN
 
Asp.net
Asp.netAsp.net
Asp.net
BALUJAINSTITUTE
 
Ajax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web ApplicationsAjax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web Applications
Siva Kumar
 
Drupal is not your Website
Drupal is not your Website Drupal is not your Website
Drupal is not your Website
Phase2
 
Azure Platform
Azure Platform Azure Platform
Azure Platform
Wes Yanaga
 
Building LinkedIn's Learning Platform with MongoDB
Building LinkedIn's Learning Platform with MongoDBBuilding LinkedIn's Learning Platform with MongoDB
Building LinkedIn's Learning Platform with MongoDB
MongoDB
 
Cert05 70-487 - developing microsoft azure and web services
Cert05   70-487 - developing microsoft azure and web servicesCert05   70-487 - developing microsoft azure and web services
Cert05 70-487 - developing microsoft azure and web services
DotNetCampus
 
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
 
Exciting JavaScript - Part II
Exciting JavaScript - Part IIExciting JavaScript - Part II
Exciting JavaScript - Part II
Eugene Lazutkin
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
Eugene Lazutkin
 
facebook architecture for 600M users
facebook architecture for 600M usersfacebook architecture for 600M users
facebook architecture for 600M users
Jongyoon Choi
 
Caching Strategies for Scaling Drupal: Common Missteps vs Best Practices
Caching Strategies for Scaling Drupal: Common Missteps vs Best PracticesCaching Strategies for Scaling Drupal: Common Missteps vs Best Practices
Caching Strategies for Scaling Drupal: Common Missteps vs Best Practices
Acquia
 
jmp206 - Lotus Domino Web Services Jumpstart
jmp206 - Lotus Domino Web Services Jumpstartjmp206 - Lotus Domino Web Services Jumpstart
jmp206 - Lotus Domino Web Services Jumpstart
Bill Buchan
 
Local Storage for Web Applications
Local Storage for Web ApplicationsLocal Storage for Web Applications
Local Storage for Web Applications
Markku Laine
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
vamsi krishna
 
Migration from Legacy CMS to Drupal
Migration from Legacy CMS to DrupalMigration from Legacy CMS to Drupal
Migration from Legacy CMS to Drupal
Rachel Jaro
 

Similar to HTML5 features & JavaScript APIs (20)

Html5 phillycc
Html5 phillyccHtml5 phillycc
Html5 phillycc
Jennifer Kenderdine
 
HTML5 and CSS3 refresher
HTML5 and CSS3 refresherHTML5 and CSS3 refresher
HTML5 and CSS3 refresher
Ivano Malavolta
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
Pravasini Sahoo
 
HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
hotrannam
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
Alek Davis
 
Building Rich Internet Apps with Silverlight 2
Building Rich Internet Apps with Silverlight 2Building Rich Internet Apps with Silverlight 2
Building Rich Internet Apps with Silverlight 2
Microsoft Iceland
 
Webdev battacherjee
Webdev battacherjeeWebdev battacherjee
Webdev battacherjee
RavingTiger
 
Html 5
Html 5Html 5
Html 5
Nguyen Quang
 
IE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIGIE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIG
Reagan Hwang
 
Serverless SQL
Serverless SQLServerless SQL
Serverless SQL
Torsten Steinbach
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
Nagendra Um
 
Html5 n css3
Html5 n css3Html5 n css3
Html5 n css3
Jindal Gohil
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
Ganesh Kondal
 
Web Development Technologies
Web Development TechnologiesWeb Development Technologies
Web Development Technologies
Vignesh Prajapati
 
What is HTML 5?
What is HTML 5?What is HTML 5?
What is HTML 5?
Susan Winters
 
Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.ppt
Young Alista
 
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
Teamstudio
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
Cloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumCloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming Curriculum
Steven Miller
 
Bringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePointBringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePoint
Chad Schroeder
 
HTML5 and CSS3 refresher
HTML5 and CSS3 refresherHTML5 and CSS3 refresher
HTML5 and CSS3 refresher
Ivano Malavolta
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
Pravasini Sahoo
 
HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
hotrannam
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
Alek Davis
 
Building Rich Internet Apps with Silverlight 2
Building Rich Internet Apps with Silverlight 2Building Rich Internet Apps with Silverlight 2
Building Rich Internet Apps with Silverlight 2
Microsoft Iceland
 
Webdev battacherjee
Webdev battacherjeeWebdev battacherjee
Webdev battacherjee
RavingTiger
 
IE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIGIE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIG
Reagan Hwang
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
Nagendra Um
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
Ganesh Kondal
 
Web Development Technologies
Web Development TechnologiesWeb Development Technologies
Web Development Technologies
Vignesh Prajapati
 
Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.ppt
Young Alista
 
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!
Teamstudio
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
Cloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumCloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming Curriculum
Steven Miller
 
Bringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePointBringing HTML5 alive in SharePoint
Bringing HTML5 alive in SharePoint
Chad Schroeder
 
Ad

More from Fisnik Doko (7)

Developing Solutions for Azure - Best Practices
Developing Solutions for Azure - Best PracticesDeveloping Solutions for Azure - Best Practices
Developing Solutions for Azure - Best Practices
Fisnik Doko
 
Building Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft AzureBuilding Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft Azure
Fisnik Doko
 
Power BI measure and visualize project success
Power BI measure and visualize project successPower BI measure and visualize project success
Power BI measure and visualize project success
Fisnik Doko
 
Microsoft's modern technologies
Microsoft's modern technologiesMicrosoft's modern technologies
Microsoft's modern technologies
Fisnik Doko
 
Predictive Analysis using Microsoft SQL Server R Services
Predictive Analysis using Microsoft SQL Server R ServicesPredictive Analysis using Microsoft SQL Server R Services
Predictive Analysis using Microsoft SQL Server R Services
Fisnik Doko
 
C# 7 development
C# 7 developmentC# 7 development
C# 7 development
Fisnik Doko
 
Analyses and processing of big data in financial services
Analyses and processing of big data in financial servicesAnalyses and processing of big data in financial services
Analyses and processing of big data in financial services
Fisnik Doko
 
Developing Solutions for Azure - Best Practices
Developing Solutions for Azure - Best PracticesDeveloping Solutions for Azure - Best Practices
Developing Solutions for Azure - Best Practices
Fisnik Doko
 
Building Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft AzureBuilding Scalable Applications with Microsoft Azure
Building Scalable Applications with Microsoft Azure
Fisnik Doko
 
Power BI measure and visualize project success
Power BI measure and visualize project successPower BI measure and visualize project success
Power BI measure and visualize project success
Fisnik Doko
 
Microsoft's modern technologies
Microsoft's modern technologiesMicrosoft's modern technologies
Microsoft's modern technologies
Fisnik Doko
 
Predictive Analysis using Microsoft SQL Server R Services
Predictive Analysis using Microsoft SQL Server R ServicesPredictive Analysis using Microsoft SQL Server R Services
Predictive Analysis using Microsoft SQL Server R Services
Fisnik Doko
 
C# 7 development
C# 7 developmentC# 7 development
C# 7 development
Fisnik Doko
 
Analyses and processing of big data in financial services
Analyses and processing of big data in financial servicesAnalyses and processing of big data in financial services
Analyses and processing of big data in financial services
Fisnik Doko
 
Ad

Recently uploaded (20)

Gibson "Secrets to Changing Behaviour in Scholarly Communication: A 2025 NISO...
Gibson "Secrets to Changing Behaviour in Scholarly Communication: A 2025 NISO...Gibson "Secrets to Changing Behaviour in Scholarly Communication: A 2025 NISO...
Gibson "Secrets to Changing Behaviour in Scholarly Communication: A 2025 NISO...
National Information Standards Organization (NISO)
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
Quiz Club of PSG College of Arts & Science
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptxCapitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdfFEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad UpdatesLDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
Quiz Club of PSG College of Arts & Science
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition OecdEnergy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
IDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptxIDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptx
ArneeAgligar
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptxCapitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdfFEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad UpdatesLDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition OecdEnergy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
IDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptxIDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptx
ArneeAgligar
 

HTML5 features & JavaScript APIs

  • 2. Fisnik Doko Microsoft Certified Trainer / Semos Education HTML5 features & JavaScript APIs 2
  • 4. General Sponsors Platinum Sponsors Silver Sponsors Gold Sponsors Bronze Sponsors 4
  • 5. Speaker Fisnik Doko • MCSD – Web Apps • MCPD – Web Developer • MCSE – Data Platform • MCSA – SQL 2012/2014 • MCTS – Web Forms, Data Access, WCF • MS – C#, HTML5, MVC, SHP 2013 • MCP, MCT, MSc • Microsoft Trainer – Semos Education • Software Developer – NBRM • Consultant 5
  • 7. HTML 4 VS HTML 5 • You don’t get rid of HTML4 standards – you just improve upon them! 7 Standard Improvements
  • 8. What's New in HTML5? HTML5 provides many extensions over previous versions, including: • Rules for browser vendors • New elements that reflect modern web application development • JavaScript APIs that support desktop and mobile application capabilities • Each version of HTML has its own DOCTYPE – The browser uses the DOCTYPE declaration to determine how to interpret the HTML markup – For HTML5 pages, specify a DOCTYPE of html <!DOCTYPE HTML> 8
  • 9. Document Structure in HTML5 HTML5 provides new elements to define the structure of a web page: • <section> to divide up main content • <header> and <footer> for page headers and footers • <nav> for navigations links • <article> for stand-alone content • <aside> for quotes and sidebar content • <hgroup> • <figure> and <figcaption> • <mark> 9
  • 10. HTML5 Input Type • <input type=“range”> - for sliders • <input type=“color”> - for color pickers • <input type=“tel”> - for telephone numbers • <input type=“url”> - for web addresses • <input type=“email”> - for email addresses • <input type=“date”> - for calendar date pickers • <input type=“month”> - for a list of months • <input type=“week”> - for weeks • <input type=“time”> - timestamps • <input type=“datetime”> - for precise, absolute date+time • <input type=“datetime-local”> - for local dates and times • <input type=“number”> - for spinboxes • <input type=“search”> - for search boxes 10
  • 11. HTML5 Input Attributes • Input attributes modify the behavior of input types and forms to provide better feedback and usability: – autofocus – autocomplete – required – pattern – placeholder – many other input type-specific attributes – Ex. number input type supports the max, min, step, and value attributes • If the data is not valid, display custom error message by using the setCustomValidity function 11
  • 13. Creating Interactive Pages by Using HTML5 APIs 13
  • 14. File API • The HTML5 File API enables a web application to access the local file system • There are four key interfaces: – Blob – immutable raw binary data – File - read-only information about a file (name, size, type) – FileList – an array of files – FileReader – methods for reading data from a file or blob • The FileReader interface provides methods for reading a file or blob • FileReader reads data asynchronously and fires events • File contents are available through the result attribute on the FileReader object 14
  • 15. Drag & Drop API • Allows objects to be dragged and then dropped onto a target. • HTML5 supports drag-and-drop – The user can drag HTML elements, or files from the local file system – The user can drop items onto drop-enabled target elements • To support drag and drop operations – Enable drag support on HTML elements, if required – Enable drop support on HTML drop target elements • Propagation and Prevention 15 Drag Source Drag Target dragstart drag dragenter dragover dragleave drop dragend
  • 16. HTML5 Audio and Video • New HTML5 media elements – <audio> and <video> • Native audio and video • Add videos and audio as if it was an image • Codec support varies, but multiple source elements and fallback content can be used • Complete JavaScript API available 16 <video width="300" height="200" poster="MyPoster.jpg" autoplay="autoplay" muted="muted" controls="controls" loop="loop" > <source src="media/video1.mp4" type="video/mp4" /> <source src="media/video1.ogv" type="video/ogg" /> <source src="media/video1.webm" type="video/webm" /> <object id="flash1" data="Media/Video1.swf" type="application/x-shockwave-flash"> <param name="movie" value="Media/Video1.swf"> </object> </video>
  • 17. GeoLocation API • Geolocation interface represents an object able to programmatically obtain the position of the device • A host device can use several techniques to obtain geolocation information: – IP address – GPS positioning – Wi-Fi – Cell phone location – User-defined location information 17 navigator.geolocation.getCurrentPosition(myPositionCallbackFunction, myPositionErrorCallbackFunction, {enableHighAccuracy: true, timeout: 5000} ); var watchID = navigator.geolocation.watchPosition(myPositionCallbackFunction, myPositionErrorCallbackFunction, {enableHighAccuracy: true, maximumAge: 10000} );
  • 18. Page Visibility API • Page Visibility API consists of two properties and an event: – document.hidden property describes whether the page is visible or not – The visibilitychange event fires any time the visibility state of the page changes • HTML5 allows online and offline detection • navigator.onLine property, which indicates whether the browser is online or offline 18
  • 19. Web Workers • Web workers enable a web page to move code to a parallel execution environment, enabling the browser to remain responsive 1. Dedicated web workers 2. Shared web workers • A web page communicates with a web worker by sending and receiving messages: – Send messages by using the postMessage() function – Receive messages by handling the message event 19
  • 20. SVG & CANVAS • 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 • Popular library https://d3js.org/ • The Canvas API enables you to draw onto a bitmap area – Immediate mode: "fire and forget" • JavaScript APIs and drawing primitives – Simple API: 45 methods, 21 attributes – Rectangles, lines, fills, arcs, Bezier curves, … • Creating games in HTML5 Canvas • http://canvasengine.net/ 20
  • 22. Adding Offline Support to Web Applications 22
  • 23. Application Cache API • The application cache manifest file specifies the resources to cache • Use complete web sites in offline mode • Browsers cache data in an Application Cache • Application cache gives an application three advantages: – Offline browsing - users can use the application when they're offline – Speed - cached resources load faster – Reduced server load 23 CACHE MANIFEST # version 2.0 CACHE: index.html verification.js site.css graphics/logo.jpg NETWORK: /login # alternatives paths FALLBACK: /ajax/account/ /noCode.htm <html manifest=“test.appcache">
  • 24. Local Storage API - Web Storage • Local storage is more secure than cookies • Limit is far larger (at least 5MB) and information is never transferred to the server • Local storage is per domain. • Local storage persists until it is explicitly deleted or the browser’s cache is cleared. • Session storage persists until it is explicitly deleted or the browsing context is closed. • HTML local storage provides two objects for storing data on the client: – window.localStorage - stores data with no expiration date – window.sessionStorage - stores data for one session 24
  • 25. Indexed Database API • IndexedDB provides an efficient means for storing structured data on the user’s computer • IndexedDB is a JavaScript-based object-oriented database • Powerful, but may seem too complicated for simple case • The API is asynchronous, and includes the following features: – Multiple object stores – Transactions – Indexes to speed up common queries • For IndexedDB, you can use up to 50MB on desktop 25
  • 27. XMLHttpRequest, WebSocket • XMLHttpRequest Level 2 – significantly enhanced – Cross-origin XMLHttpRequests – Progress events – Binary Data • Web sockets are a solution for implementing real-time bidirectional communications on the web • The WebSockets API defines a JavaScript API for code running in a browser 27
  • 28. Animating the User Interface 28
  • 29. Transforming elements Types of transformation supported by CSS: – Translating – Rotating – Scaling – Skewing 29 div.rotate1 { transform: rotate(10deg); transform-origin: left top; }
  • 30. Keyframe Animation • SWIFFY, GOOGLE WEB DESIGNER, ADOBE EDGE 30 @keyframes name_of_animation { 0% { /* or from */ … properties to at the start of the animation … } 50% { … properties to apply after 50% of the animation … } 100% { /* or to */ … properties to apply at the end of the animation … } } CSS_rule_to_apply_animation { animation-name: name_of_animation; animation-duration: duration_of_animation; … }
  • 31. CSS 3 • Media Queries • border-radius • box-shadow • text-shadow • Linear and radial gradient • column-width & column-gap • @font-face • http://www.css3maker.com/ 31
  • 33. Complete the evaluation and earn the chance to win prizes in the closing raffle http://eval.codecamp.mk 33 Questions