SlideShare a Scribd company logo
1 of 26
Download to read offline
html 5
What’s new ?
HTML5 is the newest hyper text
markup language for websites from
the World Wide Web Consortium
(W3C).
The successor of HTML 4.01
5th
revision of the HTML
The first draft was made public in
2008
Finalized, and published, on 28
October 2014
2
The new markup language was developed based on pre-set
standards:
★ New features should be based on HTML, CSS, DOM, and JavaScript.
★ The need for external plugins (like Flash) needs to be reduced.
★ Error handling should be easier than in previous versions.
★ Scripting has to be replaced by more markup.
★ HTML5 should be device-independent.
★ The development process should be visible to the public.
3
4
Removed Elements
<acronym> <abbr>
<applet>
<object>
<dir> <ul>
<basefont>
<big> CSS
<center>
Redefined Elements
● New Semantics
● Simplified Syntax
● Character encoding
● Optional type
attributes
● Optional solidus
(/>)
New Elements
● Sectioning Elements
● Inline Elements
● Interactive Elements
} 5
The following HTML 4 elements have been removed from
HTML5:
<acronym> <applet> <basefont>
<big> <center> <dir>
<frameset> <noframes> <strike>
<tt> <font> <frame>
6
New Doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
7
<!DOCTYPE html>
Character encoding
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
8
<meta charset="utf-8">
The Figure Element
<img src="path/to/image" alt="About
image" />
<p>Image of Mars. </p>
9
<figure>
<img src="path/to/image" alt="About
image" />
<figcaption>
<p>This is an image of something
interesting. </p>
</figcaption>
</figure>
Form Handling...
● Input Types
○ Email input
○ datetime
○ Color
○ URL
○ Sliders with the Range Input
● Input Attributes
○ Placeholder
○ Required Attribute
○ Autofocus Attribute
● Regular Expressions
10
● New Form Elements
<datalist> pre-defined options for
input controls
<keygen> key-pair generator field
<output> result of a calculation
11
New Semantic Elements in HTML5
12
HTML5 adds a number of
new semantic HTML tags to
give a better definition to the
various parts (elements) that
form the structure of a
webpage.
13
<header>
<h1>Header</h1>
</header>
<nav> … </nav>
<section>
<article>
<header>
<h1>Article #1</h1>
</header>
</article>
</section>
New Features
14
Canvas
● The HTML <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.
15
HTML5 Graphics
<audio> Sound or music content
<embed> Containers for external applications (plug-ins)
<source> Sources for <video> and <audio>
<track> Tracks for <video> and <audio>
<video> Video or movie content
16
<embed> Containers for external applications
(plug-ins)
<embed type="video/quicktime" src="movie.mov"
width="640" height="480">
17
<audio>
<audio src="audio.ogg"
controls autoplay loop>
<p>Your browser does not
support the <code>audio</code>
element </p>
</audio>
18
● controls : Displays the standard
HTML5 controls for the audio on
the web page.
● autoplay : Makes the audio play
automatically.
● loop : Make the audio repeat
(loop) automatically.
<video>
<video src="http://v2v.cc/~j/theora_testsuite/320x240.ogg"
controls>
Your browser does not support the <code>video</code> element.
</video>
19
HTML5 Local Storage
Web applications can store data locally within the user's browser;
instead of cookies, included in every server request.
More secure
Large amounts of data can be stored locally (~ 5MB)
Information is never transferred to the server.
20
window.localStorage
● Stores data with no expiration
date
● It is per origin
(per domain and protocol)
All pages, from one origin, can
store and access the same data.
21
window.sessionStorage
● Stores data for one session
(data is lost when the browser
tab is closed)
<div id="result"></div>
<script>
// Check browser support
if (typeof(Storage) !== "undefined") {
// Store
localStorage.setItem("lastname", "Smith");
// Retrieve
document.getElementById("result").innerHTML = localStorage.getItem("lastname");
} else {
document.getElementById("result").innerHTML = "Sorry, your browser does not
support Web Storage...";
}
</script>
22
HTML5 Style Guide and Coding Conventions (1)
★ Use Correct Document Type
★ Use Lower Case
○ Element Names
○ Attribute Names
○ File Names
★ Close All HTML Elements < tag > … </tag>
★ Close Empty HTML Elements < tag />
23
HTML5 Style Guide and Coding Conventions (2)
★ Quote Attribute Values
○ <table class="table striped">
★ Image Attributes - alt, size
★ Do not omit <html> and <body>
★ Metadata - Language and the character encoding should be defined as
early as possible in a document
24
HTML5 Style Guide and Coding Conventions (3)
★ Avoid Long Code Lines
★ Blank Lines and Indentation
○ Blank lines to separate large or logical code blocks.
○ Add 2 spaces of indentation. Do not use TAB.
★ Style Sheets
○ Use simple syntax (the type attribute is not necessary)
○ Short rules can be written compressed, on one line.
○ Long rules should be written over multiple lines 25
Thank You =)
26

More Related Content

What's hot

Chapter 9 Getting Started with JavaScript
Chapter 9 Getting Started with JavaScriptChapter 9 Getting Started with JavaScript
Chapter 9 Getting Started with JavaScriptDr. Ahmed Al Zaidy
 
Overview to Data Transaction Management
Overview to Data Transaction ManagementOverview to Data Transaction Management
Overview to Data Transaction ManagementKhairi Aiman
 
Domain-Driven Data at the O'Reilly Software Architecture Conference
Domain-Driven Data at the O'Reilly Software Architecture ConferenceDomain-Driven Data at the O'Reilly Software Architecture Conference
Domain-Driven Data at the O'Reilly Software Architecture ConferenceDev_Events
 
The secret sauce behind {binding} in xaml
The secret sauce behind {binding} in xamlThe secret sauce behind {binding} in xaml
The secret sauce behind {binding} in xamlbrendonpage
 
Ng init | EPI Sousse
Ng init | EPI SousseNg init | EPI Sousse
Ng init | EPI SousseHamdi Hmidi
 

What's hot (10)

.Net template solution architecture
.Net template solution architecture.Net template solution architecture
.Net template solution architecture
 
Html5-Web-Storage
Html5-Web-StorageHtml5-Web-Storage
Html5-Web-Storage
 
Performance (browser)
Performance (browser)Performance (browser)
Performance (browser)
 
Asp db
Asp dbAsp db
Asp db
 
Chapter 9 Getting Started with JavaScript
Chapter 9 Getting Started with JavaScriptChapter 9 Getting Started with JavaScript
Chapter 9 Getting Started with JavaScript
 
Overview to Data Transaction Management
Overview to Data Transaction ManagementOverview to Data Transaction Management
Overview to Data Transaction Management
 
Consuming Open Data using DataJS - jsFoo
Consuming Open Data using DataJS - jsFoo Consuming Open Data using DataJS - jsFoo
Consuming Open Data using DataJS - jsFoo
 
Domain-Driven Data at the O'Reilly Software Architecture Conference
Domain-Driven Data at the O'Reilly Software Architecture ConferenceDomain-Driven Data at the O'Reilly Software Architecture Conference
Domain-Driven Data at the O'Reilly Software Architecture Conference
 
The secret sauce behind {binding} in xaml
The secret sauce behind {binding} in xamlThe secret sauce behind {binding} in xaml
The secret sauce behind {binding} in xaml
 
Ng init | EPI Sousse
Ng init | EPI SousseNg init | EPI Sousse
Ng init | EPI Sousse
 

Similar to Html 5 - What's new? (20)

Html5
Html5Html5
Html5
 
Dive into HTML5
Dive into HTML5Dive into HTML5
Dive into HTML5
 
Web Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONSWeb Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONS
 
Delhi student's day
Delhi student's dayDelhi student's day
Delhi student's day
 
Html5 ppt
Html5 pptHtml5 ppt
Html5 ppt
 
Html5
Html5Html5
Html5
 
php
phpphp
php
 
Html5 introduction
Html5 introductionHtml5 introduction
Html5 introduction
 
Html5 Basics
Html5 BasicsHtml5 Basics
Html5 Basics
 
Html,CSS & UI/UX design
Html,CSS & UI/UX designHtml,CSS & UI/UX design
Html,CSS & UI/UX design
 
HTML5_3.ppt
HTML5_3.pptHTML5_3.ppt
HTML5_3.ppt
 
HTML literals, the JSX of the platform
HTML literals, the JSX of the platformHTML literals, the JSX of the platform
HTML literals, the JSX of the platform
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5
Html5Html5
Html5
 
Html 5
Html 5Html 5
Html 5
 
HTML 5
HTML 5HTML 5
HTML 5
 
Html5
Html5Html5
Html5
 
HTML Basics by software development company india
HTML Basics by software development company indiaHTML Basics by software development company india
HTML Basics by software development company india
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
 
Html5
Html5Html5
Html5
 

More from Bethmi Gunasekara

Electron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesBethmi Gunasekara
 
General Framework for Sentiment Analysis of Twitter Data, with Special Attent...
General Framework for Sentiment Analysis of Twitter Data, with Special Attent...General Framework for Sentiment Analysis of Twitter Data, with Special Attent...
General Framework for Sentiment Analysis of Twitter Data, with Special Attent...Bethmi Gunasekara
 
TestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit TestingTestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit TestingBethmi Gunasekara
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageBethmi Gunasekara
 
Web Portal for Construction Industry
Web Portal for Construction IndustryWeb Portal for Construction Industry
Web Portal for Construction IndustryBethmi Gunasekara
 

More from Bethmi Gunasekara (6)

Electron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologies
 
General Framework for Sentiment Analysis of Twitter Data, with Special Attent...
General Framework for Sentiment Analysis of Twitter Data, with Special Attent...General Framework for Sentiment Analysis of Twitter Data, with Special Attent...
General Framework for Sentiment Analysis of Twitter Data, with Special Attent...
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
TestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit TestingTestNG - The Next Generation of Unit Testing
TestNG - The Next Generation of Unit Testing
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data Storage
 
Web Portal for Construction Industry
Web Portal for Construction IndustryWeb Portal for Construction Industry
Web Portal for Construction Industry
 

Recently uploaded

Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...Yantram Animation Studio Corporation
 
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...Suhani Kapoor
 
PODSCAPE - Brochure 2023_ prefab homes in Bangalore India
PODSCAPE - Brochure 2023_ prefab homes in Bangalore IndiaPODSCAPE - Brochure 2023_ prefab homes in Bangalore India
PODSCAPE - Brochure 2023_ prefab homes in Bangalore IndiaYathish29
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryWilliamVickery6
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpmainac1
 
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai DouxDubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Douxkojalkojal131
 
Raj Nagar Extension Call Girls 9711199012 WhatsApp No, Delhi Escorts in Raj N...
Raj Nagar Extension Call Girls 9711199012 WhatsApp No, Delhi Escorts in Raj N...Raj Nagar Extension Call Girls 9711199012 WhatsApp No, Delhi Escorts in Raj N...
Raj Nagar Extension Call Girls 9711199012 WhatsApp No, Delhi Escorts in Raj N...ankitnayak356677
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Delhi Call girls
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130Suhani Kapoor
 
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...Amil baba
 
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...Suhani Kapoor
 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptxVanshNarang19
 
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun serviceanilsa9823
 
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...Suhani Kapoor
 
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiVIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiSuhani Kapoor
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentationamedia6
 

Recently uploaded (20)

Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
 
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
 
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
PODSCAPE - Brochure 2023_ prefab homes in Bangalore India
PODSCAPE - Brochure 2023_ prefab homes in Bangalore IndiaPODSCAPE - Brochure 2023_ prefab homes in Bangalore India
PODSCAPE - Brochure 2023_ prefab homes in Bangalore India
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William Vickery
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUp
 
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai DouxDubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
 
Raj Nagar Extension Call Girls 9711199012 WhatsApp No, Delhi Escorts in Raj N...
Raj Nagar Extension Call Girls 9711199012 WhatsApp No, Delhi Escorts in Raj N...Raj Nagar Extension Call Girls 9711199012 WhatsApp No, Delhi Escorts in Raj N...
Raj Nagar Extension Call Girls 9711199012 WhatsApp No, Delhi Escorts in Raj N...
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
 
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
 
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
 
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
 
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptx
 
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
 
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
 
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
 
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiVIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentation
 

Html 5 - What's new?

  • 2. HTML5 is the newest hyper text markup language for websites from the World Wide Web Consortium (W3C). The successor of HTML 4.01 5th revision of the HTML The first draft was made public in 2008 Finalized, and published, on 28 October 2014 2
  • 3. The new markup language was developed based on pre-set standards: ★ New features should be based on HTML, CSS, DOM, and JavaScript. ★ The need for external plugins (like Flash) needs to be reduced. ★ Error handling should be easier than in previous versions. ★ Scripting has to be replaced by more markup. ★ HTML5 should be device-independent. ★ The development process should be visible to the public. 3
  • 4. 4
  • 5. Removed Elements <acronym> <abbr> <applet> <object> <dir> <ul> <basefont> <big> CSS <center> Redefined Elements ● New Semantics ● Simplified Syntax ● Character encoding ● Optional type attributes ● Optional solidus (/>) New Elements ● Sectioning Elements ● Inline Elements ● Interactive Elements } 5
  • 6. The following HTML 4 elements have been removed from HTML5: <acronym> <applet> <basefont> <big> <center> <dir> <frameset> <noframes> <strike> <tt> <font> <frame> 6
  • 7. New Doctype <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> 7 <!DOCTYPE html>
  • 9. The Figure Element <img src="path/to/image" alt="About image" /> <p>Image of Mars. </p> 9 <figure> <img src="path/to/image" alt="About image" /> <figcaption> <p>This is an image of something interesting. </p> </figcaption> </figure>
  • 10. Form Handling... ● Input Types ○ Email input ○ datetime ○ Color ○ URL ○ Sliders with the Range Input ● Input Attributes ○ Placeholder ○ Required Attribute ○ Autofocus Attribute ● Regular Expressions 10 ● New Form Elements <datalist> pre-defined options for input controls <keygen> key-pair generator field <output> result of a calculation
  • 12. 12 HTML5 adds a number of new semantic HTML tags to give a better definition to the various parts (elements) that form the structure of a webpage.
  • 15. Canvas ● The HTML <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. 15
  • 16. HTML5 Graphics <audio> Sound or music content <embed> Containers for external applications (plug-ins) <source> Sources for <video> and <audio> <track> Tracks for <video> and <audio> <video> Video or movie content 16
  • 17. <embed> Containers for external applications (plug-ins) <embed type="video/quicktime" src="movie.mov" width="640" height="480"> 17
  • 18. <audio> <audio src="audio.ogg" controls autoplay loop> <p>Your browser does not support the <code>audio</code> element </p> </audio> 18 ● controls : Displays the standard HTML5 controls for the audio on the web page. ● autoplay : Makes the audio play automatically. ● loop : Make the audio repeat (loop) automatically.
  • 19. <video> <video src="http://v2v.cc/~j/theora_testsuite/320x240.ogg" controls> Your browser does not support the <code>video</code> element. </video> 19
  • 20. HTML5 Local Storage Web applications can store data locally within the user's browser; instead of cookies, included in every server request. More secure Large amounts of data can be stored locally (~ 5MB) Information is never transferred to the server. 20
  • 21. window.localStorage ● Stores data with no expiration date ● It is per origin (per domain and protocol) All pages, from one origin, can store and access the same data. 21 window.sessionStorage ● Stores data for one session (data is lost when the browser tab is closed)
  • 22. <div id="result"></div> <script> // Check browser support if (typeof(Storage) !== "undefined") { // Store localStorage.setItem("lastname", "Smith"); // Retrieve document.getElementById("result").innerHTML = localStorage.getItem("lastname"); } else { document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage..."; } </script> 22
  • 23. HTML5 Style Guide and Coding Conventions (1) ★ Use Correct Document Type ★ Use Lower Case ○ Element Names ○ Attribute Names ○ File Names ★ Close All HTML Elements < tag > … </tag> ★ Close Empty HTML Elements < tag /> 23
  • 24. HTML5 Style Guide and Coding Conventions (2) ★ Quote Attribute Values ○ <table class="table striped"> ★ Image Attributes - alt, size ★ Do not omit <html> and <body> ★ Metadata - Language and the character encoding should be defined as early as possible in a document 24
  • 25. HTML5 Style Guide and Coding Conventions (3) ★ Avoid Long Code Lines ★ Blank Lines and Indentation ○ Blank lines to separate large or logical code blocks. ○ Add 2 spaces of indentation. Do not use TAB. ★ Style Sheets ○ Use simple syntax (the type attribute is not necessary) ○ Short rules can be written compressed, on one line. ○ Long rules should be written over multiple lines 25