SlideShare a Scribd company logo
1 of 38
Download to read offline
What is HTML5 ?
●

Html5 is the latest technology of the HTML standard(originally
created in 1990).

●

Html5 is an improvement of HTML4.0 and XHTML1.0.

●

Work started in 2003 by W3C and WHATWG.

●

●

●

A change from document markup language to web application
language.
An attempt to enhance the functionality and flexibility of the web.
Html5 is language for structuring and presenting content for the
World Wide Web.
New in HTML5 Features:
●
●

●
●

●

The <canvas> element for 2D drawing
The <video> and <audio> elements for media
playback
Support for local storage
New content-specific elements, like <article>,
<footer>, <header>, <nav>, <section>
New form controls, like calendar, date, time,
email, url, search
HTML5 Canvas
●

●

●

●

●

A canvas is a rectangular area on an HTML page, and it is
specified with the <canvas> element.
The HTML5 <canvas> element is used to draw graphics, on the
fly, via scripting (usually JavaScript).
The <canvas> element is only a container for graphics. You
must use a script to actually draw the graphics.
Canvas has several methods for drawing paths, boxes, circles,
text, and adding images.
The markup looks like this:
<canvas id="myCanvas" width="200" height="100"></canvas>

Note: By default, the <canvas> element has no border and no
content.
Canvas Coordinates
●

The canvas is a two-dimensional grid.

●

The upper-left corner of the canvas has coordinate (0,0) .

●

Example: Suppose we have parameters of a rectangle
as(0,0,150,75):
This means: Start at the upper-left corner (0,0) and draw a
150x75 pixels rectangle.

●
●

●

Example:
Result
Canvas – Paths
(straight line)
●

To draw straight lines on a canvas, we will use the
following two methods:
- moveTo(x,y) defines the starting 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().
Canvas – Paths
(straight line)
●

Example:
at (200,200).

Draw a straight line starting from (0,0) and ending
Canvas – Paths
(straight line)
●

Output:
Canvas – Paths
(circle)
●

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().
Canvas – Paths
(circle)
●

Example: To create a circle with the arc method.
Canvas – Paths
(circle)

●

Output:
Canvas - Text
●

To draw text on a canvas, the most important property and
methods are:
- font - defines the font properties for text
- fillText(text,x,y) - Draws "filled" text on the canvas
- strokeText(text,x,y) - Draws text on the canvas (no fill)
Canvas - Text
●

Example: Using filltext():
Canvas - Text
●

Output:
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 re
sized

●

Every element and every attribute in SVG files can be animated

●

SVG is a W3C recommendation
SVG Advantages
●

Advantages of using SVG over other image formats (like
JPEG and GIF) are:

-These can be created and edited with any text editor
- Can be searched, indexed, scripted, and compressed
- Are scalable
- Can be printed with high quality at any resolution
- Are zoom able
Comparison of Canvas and SVG
SVG Shape Elements
●

SVG has some predefined shape elements that can be used by
developers:
- Rectangle <rect>
- Circle <circle>
- Ellipse <ellipse>
- Line <line>
- Polyline <polyline>
- Polygon <polygon>
- Path <path>
SVG
●

Example:
SVG
●

Output:
HTML5 Drag and Drop
●

●

In HTML5, drag and drop is part of the standard, and any
element can be drag gable.
Make an Element Drag gable
<img draggable="true">

●

The dataTransfer.setData() method sets the data type and the
value of the dragged data:
function drag(ev)
{
ev.dataTransfer.setData("Text",ev.target.id);
}
HTML5 Geolocation
●

●

●

●

The HTML5 Geolocation API is used to get the geographical
position of a user.
this can compromise user privacy, the position is not available
unless the user approves it.
In HTML5 the getCurrentPosition() method is used to get the
user's position.
Geolocation is mainly used for the following purposes:
1. Displaying the Result in a Map
2. Location-specific Information
3. Handling Errors and Rejections
HTML5 VIDEO
●

●

●

HTML5 defines a new element which specifies
a standard way to embed a video/movie on a
web page: the <video> element.
You should also insert text content between the
<video> and </video> tags for browsers that do
not support the <video> element.
The <video> element allows multiple <source>
elements. <source> elements can link to
different video files.
HTML5 VIDEO
●

Example:
HTML5 Video
●

Output:
HTML Sounds / Audio
●

The HTML5 <audio> tag defines sound, such as music or other
audio streams.

●

The <audio> element works in all modern browsers.

●

Example:
HTML5 Input Types
●

HTML5 has several new input types for forms.

●

Some of them are:
- color
- date
- email
- number
- range
- time

●

These new features allow better input control and validation.
HTML5 Form Elements
●

HTML5 has the following new form elements:
- <datalist>
- <keygen>
- <output>
HTML5 <datalist> Element
●

●

●

●

●

The <datalist> element specifies a list of pre-defined options for
an <input> element.
The <datalist> element is used to provide an "autocomplete"
feature on <input> elements.
Users will see a drop-down list of pre-defined options as they
input data.
Use the <input> element's list attribute to bind it together with a
<datalist> element.
Example: <input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
</datalist>
HTML5 <keygen> Element
●

●

●

●

●

●

The purpose of the <keygen> element is to provide a secure
way to authenticate users.
The <keygen> tag specifies a key-pair generator field in a form.
When the form is submitted, two keys are generated, one
private and one public.
The private key is stored locally, and the public key is sent to
the server.
The public key could be used to generate a client certificate to
authenticate the user in the future.
Example:

<form action="demo_keygen.asp" method="get">
Username: <input type="text" name="usr_name">
Encryption: <keygen name="security">
<input type="submit">
</form>
HTML5 <output> Element
●

●

The <output> element represents the result of a calculation (like
one performed by a script).
Example:
<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 Form Attributes
●

HTML5 has several new attributes for <form> and <input>.

●

New attributes for <form>:
- autocomplete
- novalidate

●

New attributes for <input>:
- autocomplete

- height and width

- autofocus

- list

- form

- min and max

- formaction

- multiple

- formmethod

- pattern

- formnovalidate

- step
HTML5 Semantic Elements
●

●

A semantic element clearly describes its meaning to both the
browser and the developer.
HTML5 offers new semantic elements to clearly define different
parts of a web page:
- <header>
- <nav>
- <section>
- <article>
- <aside>
- <figcaption>
- <figure>
- <footer>
HTML5 Web Storage
●

●

●

●

●

●

With HTML5, web pages can store data locally within the user's
browser.
Web Storage is more secure and faster.
The data is not included with every server request, but used
ONLY when asked for.
It is also possible to store large amounts of data, without
affecting the website's performance.
It is also possible to store large amounts of data, without
affecting the website's performance.
There are two new objects for storing data on the client:
- localStorage - stores data with no expiration date
- sessionStorage - stores data for one session
The localStorage Object
●

●

●

The localStorage object stores the data with no
expiration date.
The data will not be deleted when the browser
is closed, and will be available the next day,
week, or year.
Example:

localStorage.lastname="Smith";
document.getElementById("result").innerHTML="Last name: "+
localStorage.lastname
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.
Example:
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 Application Cache
●

●

●

●

●

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

●

●

A web worker is a JavaScript running in the background,
without affecting the performance of the page.
You can continue to do whatever you want: clicking, selecting
things, etc., while the web worker runs in the background.
Since web workers are in external files, they do not have
access to the following JavaScript objects:
- The window object
- The document object
- The parent object
Thank You

More Related Content

What's hot

Chapter 8 Enhancing a website with multimedia
Chapter 8 Enhancing a website with multimediaChapter 8 Enhancing a website with multimedia
Chapter 8 Enhancing a website with multimediaDr. Ahmed Al Zaidy
 
e-suap - client technologies- english version
e-suap - client technologies- english versione-suap - client technologies- english version
e-suap - client technologies- english versionSabino Labarile
 
1. introduction to html5
1. introduction to html51. introduction to html5
1. introduction to html5JayjZens
 
jQuery - Chapter 1 - Introduction
 jQuery - Chapter 1 - Introduction jQuery - Chapter 1 - Introduction
jQuery - Chapter 1 - IntroductionWebStackAcademy
 
Graphics & Animation with HTML5
Graphics & Animation with HTML5Graphics & Animation with HTML5
Graphics & Animation with HTML5Knoldus Inc.
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)WebStackAcademy
 
Learn D3.js in 90 minutes
Learn D3.js in 90 minutesLearn D3.js in 90 minutes
Learn D3.js in 90 minutesJos Dirksen
 
Intro to DTCoreText: Moving Past UIWebView | iOS Development
Intro to DTCoreText: Moving Past UIWebView | iOS DevelopmentIntro to DTCoreText: Moving Past UIWebView | iOS Development
Intro to DTCoreText: Moving Past UIWebView | iOS DevelopmentSmartLogic
 
Ajax for dummies, and not only.
Ajax for dummies, and not only.Ajax for dummies, and not only.
Ajax for dummies, and not only.Nerd Tzanetopoulos
 
Ubuntu app development
Ubuntu app development Ubuntu app development
Ubuntu app development Xiaoguo Liu
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...Sencha
 
Model-View-Update, and Beyond!
Model-View-Update, and Beyond!Model-View-Update, and Beyond!
Model-View-Update, and Beyond!Simon Fowler
 

What's hot (20)

Chapter 8 Enhancing a website with multimedia
Chapter 8 Enhancing a website with multimediaChapter 8 Enhancing a website with multimedia
Chapter 8 Enhancing a website with multimedia
 
e-suap - client technologies- english version
e-suap - client technologies- english versione-suap - client technologies- english version
e-suap - client technologies- english version
 
Javascript and DOM
Javascript and DOMJavascript and DOM
Javascript and DOM
 
1. introduction to html5
1. introduction to html51. introduction to html5
1. introduction to html5
 
UIWebView Tips
UIWebView TipsUIWebView Tips
UIWebView Tips
 
jQuery - Chapter 1 - Introduction
 jQuery - Chapter 1 - Introduction jQuery - Chapter 1 - Introduction
jQuery - Chapter 1 - Introduction
 
Graphics & Animation with HTML5
Graphics & Animation with HTML5Graphics & Animation with HTML5
Graphics & Animation with HTML5
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
 
Html 5 - What's new?
Html 5 - What's new?Html 5 - What's new?
Html 5 - What's new?
 
Learn D3.js in 90 minutes
Learn D3.js in 90 minutesLearn D3.js in 90 minutes
Learn D3.js in 90 minutes
 
Intro to DTCoreText: Moving Past UIWebView | iOS Development
Intro to DTCoreText: Moving Past UIWebView | iOS DevelopmentIntro to DTCoreText: Moving Past UIWebView | iOS Development
Intro to DTCoreText: Moving Past UIWebView | iOS Development
 
Ajax for dummies, and not only.
Ajax for dummies, and not only.Ajax for dummies, and not only.
Ajax for dummies, and not only.
 
Java script
Java scriptJava script
Java script
 
Ubuntu app development
Ubuntu app development Ubuntu app development
Ubuntu app development
 
Javascript 2
Javascript 2Javascript 2
Javascript 2
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
Unit 4(it workshop)
Unit 4(it workshop)Unit 4(it workshop)
Unit 4(it workshop)
 
JavaScript
JavaScriptJavaScript
JavaScript
 
JSON
JSONJSON
JSON
 
Model-View-Update, and Beyond!
Model-View-Update, and Beyond!Model-View-Update, and Beyond!
Model-View-Update, and Beyond!
 

Viewers also liked

Andika Widia Putra - Perencanaan Masjid
Andika Widia Putra - Perencanaan MasjidAndika Widia Putra - Perencanaan Masjid
Andika Widia Putra - Perencanaan MasjidAndika Widia Putra
 
Andika Widia Putra_Teknik Pelaksanaaan Konstruksi_Alat berat_Crane
Andika Widia Putra_Teknik Pelaksanaaan Konstruksi_Alat berat_CraneAndika Widia Putra_Teknik Pelaksanaaan Konstruksi_Alat berat_Crane
Andika Widia Putra_Teknik Pelaksanaaan Konstruksi_Alat berat_CraneAndika Widia Putra
 
Yeni microsoft office power point sunusu kopya
Yeni microsoft office power point sunusu   kopyaYeni microsoft office power point sunusu   kopya
Yeni microsoft office power point sunusu kopya3ness
 
Andika Widia Putra - Desain rumah -
Andika Widia Putra - Desain rumah - Andika Widia Putra - Desain rumah -
Andika Widia Putra - Desain rumah - Andika Widia Putra
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra
 
Andika Widia Putra - Perencanaan Pasar
Andika Widia Putra - Perencanaan Pasar Andika Widia Putra - Perencanaan Pasar
Andika Widia Putra - Perencanaan Pasar Andika Widia Putra
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra
 
The Delivery Of Bad News In An Organizations
The Delivery Of Bad News In An OrganizationsThe Delivery Of Bad News In An Organizations
The Delivery Of Bad News In An OrganizationsAyesha Khokher
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra
 
seminar on tessellation
seminar on tessellation seminar on tessellation
seminar on tessellation Ayesha Khokher
 
Perilaku kelompok dalam organisasi
Perilaku kelompok dalam organisasiPerilaku kelompok dalam organisasi
Perilaku kelompok dalam organisasiPangeran Susilo
 

Viewers also liked (15)

Andika Widia Putra - Perencanaan Masjid
Andika Widia Putra - Perencanaan MasjidAndika Widia Putra - Perencanaan Masjid
Andika Widia Putra - Perencanaan Masjid
 
Andika Widia Putra_Teknik Pelaksanaaan Konstruksi_Alat berat_Crane
Andika Widia Putra_Teknik Pelaksanaaan Konstruksi_Alat berat_CraneAndika Widia Putra_Teknik Pelaksanaaan Konstruksi_Alat berat_Crane
Andika Widia Putra_Teknik Pelaksanaaan Konstruksi_Alat berat_Crane
 
NUTRIÇÃO
NUTRIÇÃONUTRIÇÃO
NUTRIÇÃO
 
Yeni microsoft office power point sunusu kopya
Yeni microsoft office power point sunusu   kopyaYeni microsoft office power point sunusu   kopya
Yeni microsoft office power point sunusu kopya
 
Andika Widia Putra - Desain rumah -
Andika Widia Putra - Desain rumah - Andika Widia Putra - Desain rumah -
Andika Widia Putra - Desain rumah -
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah
 
Andika Widia Putra - Perencanaan Pasar
Andika Widia Putra - Perencanaan Pasar Andika Widia Putra - Perencanaan Pasar
Andika Widia Putra - Perencanaan Pasar
 
Lost
LostLost
Lost
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah
 
The Delivery Of Bad News In An Organizations
The Delivery Of Bad News In An OrganizationsThe Delivery Of Bad News In An Organizations
The Delivery Of Bad News In An Organizations
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah
 
Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah Andika Widia Putra - Desain Rumah
Andika Widia Putra - Desain Rumah
 
seminar on tessellation
seminar on tessellation seminar on tessellation
seminar on tessellation
 
Perilaku kelompok dalam organisasi
Perilaku kelompok dalam organisasiPerilaku kelompok dalam organisasi
Perilaku kelompok dalam organisasi
 

Similar to What is HTML5? Key Features and Elements Explained

Similar to What is HTML5? Key Features and Elements Explained (20)

New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
 
Html5 Future of WEB
Html5 Future of WEBHtml5 Future of WEB
Html5 Future of WEB
 
Rohit&kunjan
Rohit&kunjanRohit&kunjan
Rohit&kunjan
 
Html5
Html5Html5
Html5
 
Html5ppt
Html5pptHtml5ppt
Html5ppt
 
Html5
Html5Html5
Html5
 
HTML 5
HTML 5HTML 5
HTML 5
 
Basic html5 and javascript
Basic html5 and javascriptBasic html5 and javascript
Basic html5 and javascript
 
Html5 CSS3 jQuery Basic
Html5 CSS3 jQuery BasicHtml5 CSS3 jQuery Basic
Html5 CSS3 jQuery Basic
 
Html 5
Html 5Html 5
Html 5
 
WP - Unit I.ppt
WP - Unit I.pptWP - Unit I.ppt
WP - Unit I.ppt
 
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
 
JavaScripts & jQuery
JavaScripts & jQueryJavaScripts & jQuery
JavaScripts & jQuery
 
Performance (browser)
Performance (browser)Performance (browser)
Performance (browser)
 
Javascript
JavascriptJavascript
Javascript
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
Ddpz2613 topic9 java
Ddpz2613 topic9 javaDdpz2613 topic9 java
Ddpz2613 topic9 java
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
 
HTML 5
HTML 5HTML 5
HTML 5
 

Recently uploaded

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 

Recently uploaded (20)

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 

What is HTML5? Key Features and Elements Explained

  • 1. What is HTML5 ? ● Html5 is the latest technology of the HTML standard(originally created in 1990). ● Html5 is an improvement of HTML4.0 and XHTML1.0. ● Work started in 2003 by W3C and WHATWG. ● ● ● A change from document markup language to web application language. An attempt to enhance the functionality and flexibility of the web. Html5 is language for structuring and presenting content for the World Wide Web.
  • 2. New in HTML5 Features: ● ● ● ● ● The <canvas> element for 2D drawing The <video> and <audio> elements for media playback Support for local storage New content-specific elements, like <article>, <footer>, <header>, <nav>, <section> New form controls, like calendar, date, time, email, url, search
  • 3. HTML5 Canvas ● ● ● ● ● A canvas is a rectangular area on an HTML page, and it is specified with the <canvas> element. The HTML5 <canvas> element is used to draw graphics, on the fly, via scripting (usually JavaScript). The <canvas> element is only a container for graphics. You must use a script to actually draw the graphics. Canvas has several methods for drawing paths, boxes, circles, text, and adding images. The markup looks like this: <canvas id="myCanvas" width="200" height="100"></canvas> Note: By default, the <canvas> element has no border and no content.
  • 4. Canvas Coordinates ● The canvas is a two-dimensional grid. ● The upper-left corner of the canvas has coordinate (0,0) . ● Example: Suppose we have parameters of a rectangle as(0,0,150,75): This means: Start at the upper-left corner (0,0) and draw a 150x75 pixels rectangle. ● ● ● Example: Result
  • 5. Canvas – Paths (straight line) ● To draw straight lines on a canvas, we will use the following two methods: - moveTo(x,y) defines the starting 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().
  • 6. Canvas – Paths (straight line) ● Example: at (200,200). Draw a straight line starting from (0,0) and ending
  • 7. Canvas – Paths (straight line) ● Output:
  • 8. Canvas – Paths (circle) ● 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().
  • 9. Canvas – Paths (circle) ● Example: To create a circle with the arc method.
  • 11. Canvas - Text ● To draw text on a canvas, the most important property and methods are: - font - defines the font properties for text - fillText(text,x,y) - Draws "filled" text on the canvas - strokeText(text,x,y) - Draws text on the canvas (no fill)
  • 12. Canvas - Text ● Example: Using filltext():
  • 14. 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 re sized ● Every element and every attribute in SVG files can be animated ● SVG is a W3C recommendation
  • 15. SVG Advantages ● Advantages of using SVG over other image formats (like JPEG and GIF) are: -These can be created and edited with any text editor - Can be searched, indexed, scripted, and compressed - Are scalable - Can be printed with high quality at any resolution - Are zoom able
  • 17. SVG Shape Elements ● SVG has some predefined shape elements that can be used by developers: - Rectangle <rect> - Circle <circle> - Ellipse <ellipse> - Line <line> - Polyline <polyline> - Polygon <polygon> - Path <path>
  • 20. HTML5 Drag and Drop ● ● In HTML5, drag and drop is part of the standard, and any element can be drag gable. Make an Element Drag gable <img draggable="true"> ● The dataTransfer.setData() method sets the data type and the value of the dragged data: function drag(ev) { ev.dataTransfer.setData("Text",ev.target.id); }
  • 21. HTML5 Geolocation ● ● ● ● The HTML5 Geolocation API is used to get the geographical position of a user. this can compromise user privacy, the position is not available unless the user approves it. In HTML5 the getCurrentPosition() method is used to get the user's position. Geolocation is mainly used for the following purposes: 1. Displaying the Result in a Map 2. Location-specific Information 3. Handling Errors and Rejections
  • 22. HTML5 VIDEO ● ● ● HTML5 defines a new element which specifies a standard way to embed a video/movie on a web page: the <video> element. You should also insert text content between the <video> and </video> tags for browsers that do not support the <video> element. The <video> element allows multiple <source> elements. <source> elements can link to different video files.
  • 25. HTML Sounds / Audio ● The HTML5 <audio> tag defines sound, such as music or other audio streams. ● The <audio> element works in all modern browsers. ● Example:
  • 26. HTML5 Input Types ● HTML5 has several new input types for forms. ● Some of them are: - color - date - email - number - range - time ● These new features allow better input control and validation.
  • 27. HTML5 Form Elements ● HTML5 has the following new form elements: - <datalist> - <keygen> - <output>
  • 28. HTML5 <datalist> Element ● ● ● ● ● The <datalist> element specifies a list of pre-defined options for an <input> element. The <datalist> element is used to provide an "autocomplete" feature on <input> elements. Users will see a drop-down list of pre-defined options as they input data. Use the <input> element's list attribute to bind it together with a <datalist> element. Example: <input list="browsers"> <datalist id="browsers"> <option value="Internet Explorer"> <option value="Firefox"> <option value="Chrome"> </datalist>
  • 29. HTML5 <keygen> Element ● ● ● ● ● ● The purpose of the <keygen> element is to provide a secure way to authenticate users. The <keygen> tag specifies a key-pair generator field in a form. When the form is submitted, two keys are generated, one private and one public. The private key is stored locally, and the public key is sent to the server. The public key could be used to generate a client certificate to authenticate the user in the future. Example: <form action="demo_keygen.asp" method="get"> Username: <input type="text" name="usr_name"> Encryption: <keygen name="security"> <input type="submit"> </form>
  • 30. HTML5 <output> Element ● ● The <output> element represents the result of a calculation (like one performed by a script). Example: <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>
  • 31. HTML5 Form Attributes ● HTML5 has several new attributes for <form> and <input>. ● New attributes for <form>: - autocomplete - novalidate ● New attributes for <input>: - autocomplete - height and width - autofocus - list - form - min and max - formaction - multiple - formmethod - pattern - formnovalidate - step
  • 32. HTML5 Semantic Elements ● ● A semantic element clearly describes its meaning to both the browser and the developer. HTML5 offers new semantic elements to clearly define different parts of a web page: - <header> - <nav> - <section> - <article> - <aside> - <figcaption> - <figure> - <footer>
  • 33. HTML5 Web Storage ● ● ● ● ● ● With HTML5, web pages can store data locally within the user's browser. Web Storage is more secure and faster. The data is not included with every server request, but used ONLY when asked for. It is also possible to store large amounts of data, without affecting the website's performance. It is also possible to store large amounts of data, without affecting the website's performance. There are two new objects for storing data on the client: - localStorage - stores data with no expiration date - sessionStorage - stores data for one session
  • 34. The localStorage Object ● ● ● The localStorage object stores the data with no expiration date. The data will not be deleted when the browser is closed, and will be available the next day, week, or year. Example: localStorage.lastname="Smith"; document.getElementById("result").innerHTML="Last name: "+ localStorage.lastname
  • 35. 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. Example: 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.";
  • 36. HTML5 Application Cache ● ● ● ● ● HTML5 introduces application cache, which means that a web application is cached, and accessible without an internet connection. Application cache gives an application three advantages: Offline browsing - users can use the application when they're offline Speed - cached resources load faster Reduced server load - the browser will only download updated/changed resources from the server
  • 37. HTML5 Web Workers ● ● ● A web worker is a JavaScript running in the background, without affecting the performance of the page. You can continue to do whatever you want: clicking, selecting things, etc., while the web worker runs in the background. Since web workers are in external files, they do not have access to the following JavaScript objects: - The window object - The document object - The parent object