SlideShare a Scribd company logo
1 of 40
RANDOM HTML 5 STUFF: INTRODUCTION TO HTML5
 This document is created when I was creating a
video and was typing.
 Just improved by little bit, not much
 HTML is not rocket science..
 Anyway, HTML5
 Any application, having web-based user
interface, in general, will use HTML
 HTML5 is the most recent version of HTML..
 Just an example of HTML5 document
structure...
2016-10-09
1
sayed@justetc.net
BY THE WAY THIS IS
Sayed Ahmed
http://sayed.justetc.net
Software/Web/Mobile
Architect/Engineer/Developer
2016-10-09
2
sayed@justetc.net
 All of our services
 http://www.sitestree.com/our-services/
 Our training services
 In English:
 www.SaLearningSchool.com
 English.SaLearningSchool.com,
 www.SitesTree.com
 In Bangla:
 Bangla.SaLearningSchool.com
 Blog.SaLearningSchool.com
 Ask a question and get answers :
 Ask.JustEtc.net
 Offline IT Training (Occasional):
 University.JustEtc.net
2016-10-09
3
sayed@justetc.net
HTML 5
 So you can see the structure of a well structured
HTML5 document
 view-source:http://www.justetc.net/
 It is kind of modified than I showed in the video
 The doctype <!DOCTYPE html> is simple
 Previously you had transitional, strict, loose...
 Loose-> do not care for perfectness that much
 Transitional -> better, somewhat
forgiving...usually the common choice
 Strict -> your HTML need to be perfect...
2016-10-09
4
sayed@justetc.net
HTML 5
 <meta charset="utf-8"> is important in html 5
 These were there before (I mean, before
HTML 5
 <meta name="description" content="Your
description">
 <meta name="keywords" content="Your
keywords">
 <meta name="author" content="Your name">
 Meta stuff
2016-10-09
5
sayed@justetc.net
MISC HTML STUFF
 Metas can be good for SEO for some search
engines..
 Google reduced importance on meta tags
recently..
 Links to CSS and JS as usual...
2016-10-09
6
sayed@justetc.net
SUPPORTING HTML 5 TAGS FOR IE VERSIONS
 <!--[if lt IE 8]>
 <div style=' clear: both; text-align:center; position: relative;'>
 <a href="http://windows.microsoft.com/en-US/internet-
explorer/products/ie/home?ocid=ie6_countdown_bannercode">
 <img
src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_
0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated
browser. For a faster, safer browsing experience, upgrade for free today." />
 </a>
 </div>
 <![endif]-->
 <!--[if lt IE 9]>
 <script type="text/javascript" src="js/html5.js"></script>
 <link rel="stylesheet" type="text/css" media="screen" href="css/ie.css">
 <![endif]-->
2016-10-09
7
sayed@justetc.net
SUPPORTING HTML 5 TAGS FOR IE VERSIONS
 So you can see that in the html5.js, we are
creating HTML5 related tags that are not
supported in those browsers..lt IE 9
 Anyway, you can see here the main and
newer HTML 5 tags...
 In our example, document we will use..
2016-10-09
8
sayed@justetc.net
SUPPORTING HTML 5 TAGS FOR IE VERSIONS
 <!--[if lt IE 8]>
 <!--[if lt IE 9]>
 These are to handle some situations for IE
versions 8 and 9
 IE8 and before do not support some new
HTML5 tags..
 So one approach is, we create some
elements for the new HTML5 tags such as
section aside and similar
2016-10-09
9
sayed@justetc.net
SUPPORTING HTML 5 TAGS
 For HTML5 non-compliant browsers other
than IE, supply the following CSS (similar)
 Article, section, header, footer {
 display:block;
 }
2016-10-09
10
sayed@justetc.net
HTML 5 TAGS
 Header -> to create a header section
 Footer to create a footer section
 Before HTML 5, you could use div to create
sections, however, div itself does not indicate
section
 Using CSS, you can, and actually you did
defined/divided sections
 In HTML5, sections are defined using
section, header, footer tags...
2016-10-09
11
sayed@justetc.net
HTML 5 TAGS
 You can use the nav tag to define navigation
menu/section
 We actually could use section in addition to
header and footer tags
 Esp. For the content section -> to define content
section
 So section is used as well (I mean in the
example code)
 article tag is used to define an article
 aside, just to put something on the side – not
part of the main structure...
2016-10-09
12
sayed@justetc.net
HTML 5 DIFFERENCES
 Just a few more notes on HTML5
 In HTML 4, the sections are not precise with tags like
div unless you assign some styles to them.
 For defining sections, you do not need div tags but
header tags (h1..h6) can imply sections.
 HTML4 is very imprecise on what a section is and
what is it's scope.
 I just told, divs do not indicate sections unless you
assign meaningful CSS classes to them, h1 to h6
could define sections
 Actually, some of the above information are based
on Mozilla Firefox resources on HTML5, check their
site..
2016-10-09
13
sayed@justetc.net
HTML 5 AND H1..H6 TAGS
 This is important
 In HTML5, tags such as h1, h2,...h6 are relative
to the current section not relative to the whole
page
 You know that unless you customize the style, h1
to h6 decreases font-sizes..
 In HTML 5, this relativeness/relative sizes are
related to the current section
 So, you can see h1 size text in different sections
using h1 tags
2016-10-09
14
sayed@justetc.net
HTML 5 DOCUMENT OUTLINE/STRUCTURE
 article, section, nav and aside
 are always subsections to their nearest sections;
 they are not dependent on header tags
 In HTML 4, everything belongs to the main
outline of the web-page.
 In HTML5, aside does not belong to the main
outline.
 Can be used for advertising blocks
 About aside -> does not belong to the main
web-page outline
2016-10-09
15
sayed@justetc.net
HTML 5 DOCUMENT OUTLINE/STRUCTURE
 In HTML5, nav, header, footer do not belong to the
content but to the whole site
 nav, header, footer are not for content...as the name says
 For browsers, other than IE, if they do not support
HTML5 yet, we can just create the following CSS
classes to make the new tags known
 section, article, aside, footer, header, nav, hgroup {
display:block; }
 For IE and versions less than 9, we need to create the
elements as well
 using JS
 Also, as I told before...
2016-10-09
16
sayed@justetc.net
LET’S SEE SOME NEW FEATURES OF HTML5
 As the article on the left tells, some new
HTML 5 tags are
 <nav>: for navigation menu, is not part of content
 , <header>, to define header section, does not
belong to content
 <footer>, to define footer section, does not
belong to content
 and <figure>: to show figure in the content area
 You can use figcaption to define the caption of the
figure
 Figure, diagrams, and similar
2016-10-09
17
sayed@justetc.net
SOME NEW HTML5 TAGS
 <figure>
<img src="/macaque.jpg" alt="Macaque in
the trees">
<figcaption>A cheeky macaque, Lower
Kintaganban River, Borneo. Original by
<ahref="http://www.flickr.com/photos/rclark/">
Richard Clark</a></figcaption>
</figure>
2016-10-09
18
sayed@justetc.net
HTML5, FIGURE TAG
 You could do without figure tag...and using
img tag; however, figure tags make the
rendering and grouping easy
 HTML5 also tells browsers how to render
 Previous HTML specifications did not define
that, and the browsers were free to render on
their own way...
2016-10-09
19
sayed@justetc.net
HTML 5 RULES
 HTML 5 provides precise rules on how to
handle the HTML elements,
 and how to recover from errors to provide
interoperability.
 Hence, if browsers implement the
specifications correctly, you will have less
cross browser issues with html 5
2016-10-09
20
sayed@justetc.net
HTML 5 AT A GLANCE
 Check the short-note at
 http://salearningschool.com/displayArticle.php?ta
ble=Articles&articleID=1318
2016-10-09
21
sayed@justetc.net
HTML5 SERVER-SENT EVENTS
 Servers can push data
 Remote scripts sending updates
 How to check if the browser supports it or not
 SSE is supported by all major browsers except
Internet Explorer.
if(typeof(EventSource)!=="undefined") { // Yes! }
else { // Sorry! No }
 The code to check for browser support for other
similar HTML 5 features will also be similar to
the above code
2016-10-09
22
sayed@justetc.net
HTML5 SERVER-SENT EVENTS
 <?php
header('Content-Type: text/event-stream');
header('Cache-Control: no-cache');
$time = date();
echo ("Server time: {$time}");
flush();
?>
2016-10-09
23
sayed@justetc.net
SSE AND WEB-WORKER
 Server is sending message, client is
displaying...
 HTML5 now can do it
 You could do using Ajax previously..
 HTML 5 Web Worker
 A Web Worker is a JavaScript Code running in
the background without interfering (delaying)
user interactions.
2016-10-09
24
sayed@justetc.net
HTML5 APPLICATION CACHE
 < html manifest="manifest_file.appcache" >
 Control caching from client side
 HTML5 Web Storage
 Offline storage
 This is cookie like storage but more secure and
faster.
2016-10-09
25
sayed@justetc.net
HTML5 FORM ATTRIBUTES
 autocomplete, novalidate are the two new
attributes for the form tag.
 novalidate indicates when the form will be
submitted, no validation will be performed on
the data.
 HTML 5 form attributes
 autocomplete, autofocus, form, formaction,
formenctype, formmethod, formnovalidate,
formtarget, height and width, list, min and max,
multiple, pattern (regexp), paceholder, required, step
 Using pattern attribute, you can define regex for validation
2016-10-09
26
sayed@justetc.net
HTML5 NEW FORM ELEMENTS
 HTML5 New Form Elements
 datalist: pre defined list of data for an input
element
 keygen: generates public key and private key
 output: used to keep output data
2016-10-09
27
sayed@justetc.net
SOME NEW INPUT TYPES IN HTML5
 Copy the following code and open in a browser
 <input type="color" name="...">
<input type="date" name="...">
<input type="datetime" name="...">
<input type="datetime-local" name="...">
<input type="email" name="...">
<input type="month" name="...">
<input type="number" name="..." min="1" max="5">
<input type="range" name="..." min="1" max="10">
<input type="search" name="...">
<input type="tel" name="...">
<input type="time" name="...">
<input type="url" name="...">
<input type="week" name="...">
2016-10-09
28
sayed@justetc.net
SOME NEW INPUT TYPES IN HTML5
 You can find some cool controls such as
 Color picker and
 Date controls
2016-10-09
29
sayed@justetc.net
HTML5 AND AUDIO/VIDEO
 Audio and video are two main selling points
for HTML5
 <audio controls="controls">
<source src="xyz.ogg" type="audio/ogg">
<source src="xyz.mp3" type="audio/mpeg">
</audio>
2016-10-09
30
sayed@justetc.net
HTML5 VIDEO
 Supported by: Internet Explorer 9, Firefox,
Opera, Chrome, and Safari
 <video width="320" height="240"
controls="controls">
<source src="xyz.mp4" type="video/mp4">
<source src="xyz.ogg" type="video/ogg">
</video>
2016-10-09
31
sayed@justetc.net
LOCATION TRACKING WITH GEOLOCATION
 HTML5 Geolocation
 navigator.geolocation.getCurrentPosition can
be used to find user's current position
2016-10-09
32
sayed@justetc.net
HTML5 DRAG AND DROP
 Any element is draggable
 The element you want to drag needs to use the
attribute draggable="true";
 You need to use ondragstart and setData() to
specify what should happen on drag event.
 ondragover mentions where the dragged data
can be dropped.
 Example
 http://www.w3schools.com/html/tryit.asp?filename=tr
yhtml5_draganddrop
2016-10-09
33
sayed@justetc.net
HTML5 INLINE SVG: SUPPORTING VECTOR GRAPHICS
 In HTML5, you can use SVG tag to include
vector graphics. SVG defines graphics in xml
format. Vector Graphics are independent of
resolution, can have events, can be
manipulated without being redrawn
 Vector graphics are good in the sense that
quality does not degrade with resolution
changes
2016-10-09
34
sayed@justetc.net
CANVAS FOR DRAWING (SIMPLE DRAWING)
 <canvas id="myCanvas" width="200"
height="100"></canvas>
 to draw
 <script type="text/javascript">
var
c=document.getElementById("canvas_id");
var ctx=c.getContext("2d"); //java like
drawing...
ctx.fillStyle="#FFFF00";
ctx.fillRect(0,0,200,100);
</script>
2016-10-09
35
sayed@justetc.net
NEW ELEMENTS IN HTML5
 article,
 aside,
 bdi,
 command,
 details,
 summary,
 figure,
 figcaption,
 footer,
2016-10-09
36
sayed@justetc.net
NEW ELEMENTS IN HTML5
 header,
 hgroup,
 mark,
 meter,
 nav,
 progress,
 ruby,
 rt,
 section,
 time,
 wbr
2016-10-09
37
sayed@justetc.net
WAS SHOWING A DEMO HTML 5 SITE
 This is a HTML site...
 type="email“ is used
 It used iframe for video
 Did not use video tag..
 You can find some HTML5 and video tag related
custom library
 Tried such control in a project
 Though playing in phone was pretty slow...probably it
was not even showing up...anyway..later the
requirements changed and no further work were
done on that
2016-10-09
38
sayed@justetc.net
VIDEO.JS, HTML5 VIDEO PLAYER
 Video.js that is what I was talking about...
 HTML5 video player...
 Here, you can see the use of different html5
tags
 That’s all for now...
2016-10-09
39
sayed@justetc.net
ANY CONCERNS?
http://ask.justetc.net
2016-10-09
40
sayed@justetc.net

More Related Content

What's hot

HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examplesAlfredo Torre
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Terry Ryan
 
Html 5 New Features
Html 5 New FeaturesHtml 5 New Features
Html 5 New FeaturesAta Ebrahimi
 
Html5 and-css3-overview
Html5 and-css3-overviewHtml5 and-css3-overview
Html5 and-css3-overviewJacob Nelson
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5IT Geeks
 
HTML5 and the web of tomorrow!
HTML5  and the  web of tomorrow!HTML5  and the  web of tomorrow!
HTML5 and the web of tomorrow!Christian Heilmann
 
Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtmlsagaroceanic11
 
Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011Zi Bin Cheah
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginnersSingsys Pte Ltd
 
HTML5 & Friends
HTML5 & FriendsHTML5 & Friends
HTML5 & FriendsRemy Sharp
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookScottperrone
 
Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Peter Lubbers
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5Jamshid Hashimi
 

What's hot (20)

HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examples
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Html 5 New Features
Html 5 New FeaturesHtml 5 New Features
Html 5 New Features
 
Html5 and-css3-overview
Html5 and-css3-overviewHtml5 and-css3-overview
Html5 and-css3-overview
 
Html5 Basics
Html5 BasicsHtml5 Basics
Html5 Basics
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Css, xhtml, javascript
Css, xhtml, javascriptCss, xhtml, javascript
Css, xhtml, javascript
 
HTML5 and the web of tomorrow!
HTML5  and the  web of tomorrow!HTML5  and the  web of tomorrow!
HTML5 and the web of tomorrow!
 
Html5 Basic Structure
Html5 Basic StructureHtml5 Basic Structure
Html5 Basic Structure
 
Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtml
 
HTML5
HTML5HTML5
HTML5
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
HTML5 & Friends
HTML5 & FriendsHTML5 & Friends
HTML5 & Friends
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - Ebook
 
HTML5 & CSS3
HTML5 & CSS3 HTML5 & CSS3
HTML5 & CSS3
 
Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
 
HTML - 5 - Introduction
HTML - 5 - IntroductionHTML - 5 - Introduction
HTML - 5 - Introduction
 

Viewers also liked

Viewers also liked (11)

Nnnnooemi pool riooss 1c
Nnnnooemi pool riooss 1cNnnnooemi pool riooss 1c
Nnnnooemi pool riooss 1c
 
Introduction à HTML 5
Introduction à HTML 5Introduction à HTML 5
Introduction à HTML 5
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
Introduction to html 5
Introduction to html 5Introduction to html 5
Introduction to html 5
 
An Intro to Mobile HTML5
An Intro to Mobile HTML5An Intro to Mobile HTML5
An Intro to Mobile HTML5
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 
Introduction to php basics
Introduction to php   basicsIntroduction to php   basics
Introduction to php basics
 
Html 5, a gentle introduction
Html 5, a gentle introductionHtml 5, a gentle introduction
Html 5, a gentle introduction
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 

Similar to Introduction to html 5

Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateDaniel Downs
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5Manav Prasad
 
Introduction to html55
Introduction to html55Introduction to html55
Introduction to html55subrat55
 
1. Introduction to HTML5.ppt
1. Introduction to HTML5.ppt1. Introduction to HTML5.ppt
1. Introduction to HTML5.pptJyothiAmpally
 
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTESSony235240
 
1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentation1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentationJohnLagman3
 
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 RSOLUTIONSRSolutions
 
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete ReferenceEPAM Systems
 
7 new techniques every web developer should know
7 new techniques every web developer should know7 new techniques every web developer should know
7 new techniques every web developer should knowMitiz Technologies
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5kolev-prp
 
Delhi student's day
Delhi student's dayDelhi student's day
Delhi student's dayAnkur Mishra
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5Ravi Raj
 

Similar to Introduction to html 5 (20)

Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_template
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
Wa html5-pdf
Wa html5-pdfWa html5-pdf
Wa html5-pdf
 
Wa html5-pdf
Wa html5-pdfWa html5-pdf
Wa html5-pdf
 
Introduction to html55
Introduction to html55Introduction to html55
Introduction to html55
 
1. Introduction to HTML5.ppt
1. Introduction to HTML5.ppt1. Introduction to HTML5.ppt
1. Introduction to HTML5.ppt
 
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
 
INTRODUCTIONS OF HTML
INTRODUCTIONS OF HTMLINTRODUCTIONS OF HTML
INTRODUCTIONS OF HTML
 
Wa html5-pdf
Wa html5-pdfWa html5-pdf
Wa html5-pdf
 
Wa html5-pdf
Wa html5-pdfWa html5-pdf
Wa html5-pdf
 
1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentation1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentation
 
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
 
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete Reference
 
7 new techniques every web developer should know
7 new techniques every web developer should know7 new techniques every web developer should know
7 new techniques every web developer should know
 
Xhtml validation
Xhtml validationXhtml validation
Xhtml validation
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
Html5
Html5Html5
Html5
 
Delhi student's day
Delhi student's dayDelhi student's day
Delhi student's day
 
HTML5 101
HTML5 101HTML5 101
HTML5 101
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
 

More from Sayed Ahmed

Workplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsWorkplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsSayed Ahmed
 
Python py charm anaconda jupyter installation and basic commands
Python py charm anaconda jupyter   installation and basic commandsPython py charm anaconda jupyter   installation and basic commands
Python py charm anaconda jupyter installation and basic commandsSayed Ahmed
 
[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic frameworkSayed Ahmed
 
Sap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSayed Ahmed
 
Will be an introduction to
Will be an introduction toWill be an introduction to
Will be an introduction toSayed Ahmed
 
Whm and cpanel overview hosting control panel overview
Whm and cpanel overview   hosting control panel overviewWhm and cpanel overview   hosting control panel overview
Whm and cpanel overview hosting control panel overviewSayed Ahmed
 
Web application development using zend framework
Web application development using zend frameworkWeb application development using zend framework
Web application development using zend frameworkSayed Ahmed
 
Web design and_html_part_3
Web design and_html_part_3Web design and_html_part_3
Web design and_html_part_3Sayed Ahmed
 
Web design and_html_part_2
Web design and_html_part_2Web design and_html_part_2
Web design and_html_part_2Sayed Ahmed
 
Web design and_html
Web design and_htmlWeb design and_html
Web design and_htmlSayed Ahmed
 
Visual studio ide shortcuts
Visual studio ide shortcutsVisual studio ide shortcuts
Visual studio ide shortcutsSayed Ahmed
 
Unit tests in_symfony
Unit tests in_symfonyUnit tests in_symfony
Unit tests in_symfonySayed Ahmed
 
Telerik this is sayed
Telerik this is sayedTelerik this is sayed
Telerik this is sayedSayed Ahmed
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_designSayed Ahmed
 
Story telling and_narrative
Story telling and_narrativeStory telling and_narrative
Story telling and_narrativeSayed Ahmed
 

More from Sayed Ahmed (20)

Workplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsWorkplace, Data Analytics, and Ethics
Workplace, Data Analytics, and Ethics
 
Python py charm anaconda jupyter installation and basic commands
Python py charm anaconda jupyter   installation and basic commandsPython py charm anaconda jupyter   installation and basic commands
Python py charm anaconda jupyter installation and basic commands
 
[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework
 
Sap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSap hana-ide-overview-nodev
Sap hana-ide-overview-nodev
 
Invest wisely
Invest wiselyInvest wisely
Invest wisely
 
Will be an introduction to
Will be an introduction toWill be an introduction to
Will be an introduction to
 
Whm and cpanel overview hosting control panel overview
Whm and cpanel overview   hosting control panel overviewWhm and cpanel overview   hosting control panel overview
Whm and cpanel overview hosting control panel overview
 
Web application development using zend framework
Web application development using zend frameworkWeb application development using zend framework
Web application development using zend framework
 
Web design and_html_part_3
Web design and_html_part_3Web design and_html_part_3
Web design and_html_part_3
 
Web design and_html_part_2
Web design and_html_part_2Web design and_html_part_2
Web design and_html_part_2
 
Web design and_html
Web design and_htmlWeb design and_html
Web design and_html
 
Visual studio ide shortcuts
Visual studio ide shortcutsVisual studio ide shortcuts
Visual studio ide shortcuts
 
Virtualization
VirtualizationVirtualization
Virtualization
 
User interfaces
User interfacesUser interfaces
User interfaces
 
Unreal
UnrealUnreal
Unreal
 
Unit tests in_symfony
Unit tests in_symfonyUnit tests in_symfony
Unit tests in_symfony
 
Telerik this is sayed
Telerik this is sayedTelerik this is sayed
Telerik this is sayed
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_design
 
Symfony 2
Symfony 2Symfony 2
Symfony 2
 
Story telling and_narrative
Story telling and_narrativeStory telling and_narrative
Story telling and_narrative
 

Recently uploaded

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Recently uploaded (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

Introduction to html 5

  • 1. RANDOM HTML 5 STUFF: INTRODUCTION TO HTML5  This document is created when I was creating a video and was typing.  Just improved by little bit, not much  HTML is not rocket science..  Anyway, HTML5  Any application, having web-based user interface, in general, will use HTML  HTML5 is the most recent version of HTML..  Just an example of HTML5 document structure... 2016-10-09 1 sayed@justetc.net
  • 2. BY THE WAY THIS IS Sayed Ahmed http://sayed.justetc.net Software/Web/Mobile Architect/Engineer/Developer 2016-10-09 2 sayed@justetc.net
  • 3.  All of our services  http://www.sitestree.com/our-services/  Our training services  In English:  www.SaLearningSchool.com  English.SaLearningSchool.com,  www.SitesTree.com  In Bangla:  Bangla.SaLearningSchool.com  Blog.SaLearningSchool.com  Ask a question and get answers :  Ask.JustEtc.net  Offline IT Training (Occasional):  University.JustEtc.net 2016-10-09 3 sayed@justetc.net
  • 4. HTML 5  So you can see the structure of a well structured HTML5 document  view-source:http://www.justetc.net/  It is kind of modified than I showed in the video  The doctype <!DOCTYPE html> is simple  Previously you had transitional, strict, loose...  Loose-> do not care for perfectness that much  Transitional -> better, somewhat forgiving...usually the common choice  Strict -> your HTML need to be perfect... 2016-10-09 4 sayed@justetc.net
  • 5. HTML 5  <meta charset="utf-8"> is important in html 5  These were there before (I mean, before HTML 5  <meta name="description" content="Your description">  <meta name="keywords" content="Your keywords">  <meta name="author" content="Your name">  Meta stuff 2016-10-09 5 sayed@justetc.net
  • 6. MISC HTML STUFF  Metas can be good for SEO for some search engines..  Google reduced importance on meta tags recently..  Links to CSS and JS as usual... 2016-10-09 6 sayed@justetc.net
  • 7. SUPPORTING HTML 5 TAGS FOR IE VERSIONS  <!--[if lt IE 8]>  <div style=' clear: both; text-align:center; position: relative;'>  <a href="http://windows.microsoft.com/en-US/internet- explorer/products/ie/home?ocid=ie6_countdown_bannercode">  <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_ 0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />  </a>  </div>  <![endif]-->  <!--[if lt IE 9]>  <script type="text/javascript" src="js/html5.js"></script>  <link rel="stylesheet" type="text/css" media="screen" href="css/ie.css">  <![endif]--> 2016-10-09 7 sayed@justetc.net
  • 8. SUPPORTING HTML 5 TAGS FOR IE VERSIONS  So you can see that in the html5.js, we are creating HTML5 related tags that are not supported in those browsers..lt IE 9  Anyway, you can see here the main and newer HTML 5 tags...  In our example, document we will use.. 2016-10-09 8 sayed@justetc.net
  • 9. SUPPORTING HTML 5 TAGS FOR IE VERSIONS  <!--[if lt IE 8]>  <!--[if lt IE 9]>  These are to handle some situations for IE versions 8 and 9  IE8 and before do not support some new HTML5 tags..  So one approach is, we create some elements for the new HTML5 tags such as section aside and similar 2016-10-09 9 sayed@justetc.net
  • 10. SUPPORTING HTML 5 TAGS  For HTML5 non-compliant browsers other than IE, supply the following CSS (similar)  Article, section, header, footer {  display:block;  } 2016-10-09 10 sayed@justetc.net
  • 11. HTML 5 TAGS  Header -> to create a header section  Footer to create a footer section  Before HTML 5, you could use div to create sections, however, div itself does not indicate section  Using CSS, you can, and actually you did defined/divided sections  In HTML5, sections are defined using section, header, footer tags... 2016-10-09 11 sayed@justetc.net
  • 12. HTML 5 TAGS  You can use the nav tag to define navigation menu/section  We actually could use section in addition to header and footer tags  Esp. For the content section -> to define content section  So section is used as well (I mean in the example code)  article tag is used to define an article  aside, just to put something on the side – not part of the main structure... 2016-10-09 12 sayed@justetc.net
  • 13. HTML 5 DIFFERENCES  Just a few more notes on HTML5  In HTML 4, the sections are not precise with tags like div unless you assign some styles to them.  For defining sections, you do not need div tags but header tags (h1..h6) can imply sections.  HTML4 is very imprecise on what a section is and what is it's scope.  I just told, divs do not indicate sections unless you assign meaningful CSS classes to them, h1 to h6 could define sections  Actually, some of the above information are based on Mozilla Firefox resources on HTML5, check their site.. 2016-10-09 13 sayed@justetc.net
  • 14. HTML 5 AND H1..H6 TAGS  This is important  In HTML5, tags such as h1, h2,...h6 are relative to the current section not relative to the whole page  You know that unless you customize the style, h1 to h6 decreases font-sizes..  In HTML 5, this relativeness/relative sizes are related to the current section  So, you can see h1 size text in different sections using h1 tags 2016-10-09 14 sayed@justetc.net
  • 15. HTML 5 DOCUMENT OUTLINE/STRUCTURE  article, section, nav and aside  are always subsections to their nearest sections;  they are not dependent on header tags  In HTML 4, everything belongs to the main outline of the web-page.  In HTML5, aside does not belong to the main outline.  Can be used for advertising blocks  About aside -> does not belong to the main web-page outline 2016-10-09 15 sayed@justetc.net
  • 16. HTML 5 DOCUMENT OUTLINE/STRUCTURE  In HTML5, nav, header, footer do not belong to the content but to the whole site  nav, header, footer are not for content...as the name says  For browsers, other than IE, if they do not support HTML5 yet, we can just create the following CSS classes to make the new tags known  section, article, aside, footer, header, nav, hgroup { display:block; }  For IE and versions less than 9, we need to create the elements as well  using JS  Also, as I told before... 2016-10-09 16 sayed@justetc.net
  • 17. LET’S SEE SOME NEW FEATURES OF HTML5  As the article on the left tells, some new HTML 5 tags are  <nav>: for navigation menu, is not part of content  , <header>, to define header section, does not belong to content  <footer>, to define footer section, does not belong to content  and <figure>: to show figure in the content area  You can use figcaption to define the caption of the figure  Figure, diagrams, and similar 2016-10-09 17 sayed@justetc.net
  • 18. SOME NEW HTML5 TAGS  <figure> <img src="/macaque.jpg" alt="Macaque in the trees"> <figcaption>A cheeky macaque, Lower Kintaganban River, Borneo. Original by <ahref="http://www.flickr.com/photos/rclark/"> Richard Clark</a></figcaption> </figure> 2016-10-09 18 sayed@justetc.net
  • 19. HTML5, FIGURE TAG  You could do without figure tag...and using img tag; however, figure tags make the rendering and grouping easy  HTML5 also tells browsers how to render  Previous HTML specifications did not define that, and the browsers were free to render on their own way... 2016-10-09 19 sayed@justetc.net
  • 20. HTML 5 RULES  HTML 5 provides precise rules on how to handle the HTML elements,  and how to recover from errors to provide interoperability.  Hence, if browsers implement the specifications correctly, you will have less cross browser issues with html 5 2016-10-09 20 sayed@justetc.net
  • 21. HTML 5 AT A GLANCE  Check the short-note at  http://salearningschool.com/displayArticle.php?ta ble=Articles&articleID=1318 2016-10-09 21 sayed@justetc.net
  • 22. HTML5 SERVER-SENT EVENTS  Servers can push data  Remote scripts sending updates  How to check if the browser supports it or not  SSE is supported by all major browsers except Internet Explorer. if(typeof(EventSource)!=="undefined") { // Yes! } else { // Sorry! No }  The code to check for browser support for other similar HTML 5 features will also be similar to the above code 2016-10-09 22 sayed@justetc.net
  • 23. HTML5 SERVER-SENT EVENTS  <?php header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); $time = date(); echo ("Server time: {$time}"); flush(); ?> 2016-10-09 23 sayed@justetc.net
  • 24. SSE AND WEB-WORKER  Server is sending message, client is displaying...  HTML5 now can do it  You could do using Ajax previously..  HTML 5 Web Worker  A Web Worker is a JavaScript Code running in the background without interfering (delaying) user interactions. 2016-10-09 24 sayed@justetc.net
  • 25. HTML5 APPLICATION CACHE  < html manifest="manifest_file.appcache" >  Control caching from client side  HTML5 Web Storage  Offline storage  This is cookie like storage but more secure and faster. 2016-10-09 25 sayed@justetc.net
  • 26. HTML5 FORM ATTRIBUTES  autocomplete, novalidate are the two new attributes for the form tag.  novalidate indicates when the form will be submitted, no validation will be performed on the data.  HTML 5 form attributes  autocomplete, autofocus, form, formaction, formenctype, formmethod, formnovalidate, formtarget, height and width, list, min and max, multiple, pattern (regexp), paceholder, required, step  Using pattern attribute, you can define regex for validation 2016-10-09 26 sayed@justetc.net
  • 27. HTML5 NEW FORM ELEMENTS  HTML5 New Form Elements  datalist: pre defined list of data for an input element  keygen: generates public key and private key  output: used to keep output data 2016-10-09 27 sayed@justetc.net
  • 28. SOME NEW INPUT TYPES IN HTML5  Copy the following code and open in a browser  <input type="color" name="..."> <input type="date" name="..."> <input type="datetime" name="..."> <input type="datetime-local" name="..."> <input type="email" name="..."> <input type="month" name="..."> <input type="number" name="..." min="1" max="5"> <input type="range" name="..." min="1" max="10"> <input type="search" name="..."> <input type="tel" name="..."> <input type="time" name="..."> <input type="url" name="..."> <input type="week" name="..."> 2016-10-09 28 sayed@justetc.net
  • 29. SOME NEW INPUT TYPES IN HTML5  You can find some cool controls such as  Color picker and  Date controls 2016-10-09 29 sayed@justetc.net
  • 30. HTML5 AND AUDIO/VIDEO  Audio and video are two main selling points for HTML5  <audio controls="controls"> <source src="xyz.ogg" type="audio/ogg"> <source src="xyz.mp3" type="audio/mpeg"> </audio> 2016-10-09 30 sayed@justetc.net
  • 31. HTML5 VIDEO  Supported by: Internet Explorer 9, Firefox, Opera, Chrome, and Safari  <video width="320" height="240" controls="controls"> <source src="xyz.mp4" type="video/mp4"> <source src="xyz.ogg" type="video/ogg"> </video> 2016-10-09 31 sayed@justetc.net
  • 32. LOCATION TRACKING WITH GEOLOCATION  HTML5 Geolocation  navigator.geolocation.getCurrentPosition can be used to find user's current position 2016-10-09 32 sayed@justetc.net
  • 33. HTML5 DRAG AND DROP  Any element is draggable  The element you want to drag needs to use the attribute draggable="true";  You need to use ondragstart and setData() to specify what should happen on drag event.  ondragover mentions where the dragged data can be dropped.  Example  http://www.w3schools.com/html/tryit.asp?filename=tr yhtml5_draganddrop 2016-10-09 33 sayed@justetc.net
  • 34. HTML5 INLINE SVG: SUPPORTING VECTOR GRAPHICS  In HTML5, you can use SVG tag to include vector graphics. SVG defines graphics in xml format. Vector Graphics are independent of resolution, can have events, can be manipulated without being redrawn  Vector graphics are good in the sense that quality does not degrade with resolution changes 2016-10-09 34 sayed@justetc.net
  • 35. CANVAS FOR DRAWING (SIMPLE DRAWING)  <canvas id="myCanvas" width="200" height="100"></canvas>  to draw  <script type="text/javascript"> var c=document.getElementById("canvas_id"); var ctx=c.getContext("2d"); //java like drawing... ctx.fillStyle="#FFFF00"; ctx.fillRect(0,0,200,100); </script> 2016-10-09 35 sayed@justetc.net
  • 36. NEW ELEMENTS IN HTML5  article,  aside,  bdi,  command,  details,  summary,  figure,  figcaption,  footer, 2016-10-09 36 sayed@justetc.net
  • 37. NEW ELEMENTS IN HTML5  header,  hgroup,  mark,  meter,  nav,  progress,  ruby,  rt,  section,  time,  wbr 2016-10-09 37 sayed@justetc.net
  • 38. WAS SHOWING A DEMO HTML 5 SITE  This is a HTML site...  type="email“ is used  It used iframe for video  Did not use video tag..  You can find some HTML5 and video tag related custom library  Tried such control in a project  Though playing in phone was pretty slow...probably it was not even showing up...anyway..later the requirements changed and no further work were done on that 2016-10-09 38 sayed@justetc.net
  • 39. VIDEO.JS, HTML5 VIDEO PLAYER  Video.js that is what I was talking about...  HTML5 video player...  Here, you can see the use of different html5 tags  That’s all for now... 2016-10-09 39 sayed@justetc.net