SlideShare ist ein Scribd-Unternehmen logo
1 von 65
Presentation Topic:
Group Members:
2
Asfand Yar
Khan
(11051556-
009)
Syed Awais
Gillani
(11051556-029)
Abbas Rasheed
(11051556-017)
Haseeb
Ahmad
(11051556-
028)
Presentation Agenda:
 HTML5
◦ Introduction of HTML5
◦ Elements
◦ Canvas
◦ SVG
◦ Drag/Drop
◦ Geo-location
◦ Video
◦ Audio
◦ Form handling
◦ SSE
3
Presentation Agenda
Continued..
 PHP
◦ Server side Page with PHP
◦ Issues will be discussed
◦ PHP syntax
◦ Defining variables in php
 PHP String:
◦ Definition of Strings in PHP
◦ Complete server-side page using php
strings and variables.
4
HTML5
(Hyper Text Markup Language)
5
 HTML5 is The New HTML Standard
 HTML5 is designed to deliver almost
everything you want to do online without
requiring additional plug-ins. It does
everything from animation to apps, music to
movies, and can also be used to build
complicated applications that run in your
browser.
 HTML5 is also cross-platform (it does not
care whether you are using a tablet or a
Smartphone, a net book, notebook or a
Smart TV).
Introduction of HTML5:
6
Continued..
 HTML5 can also be used to write web applications that
still work when you are not online
Some of the most interesting new features in HTML5:
◦ 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>(The <nav> tag
defines a set of navigation links. NOT all links of a
document should be inside a <nav> element. The
<nav> element is intended only for major block
of navigation links.)
◦ New form controls, like
calendar, date, time, email, url, search
7
Elements
 HTML Element Syntax
◦ An HTML element starts with a start tag /
opening tag
◦ An HTML element ends with an end tag /
closing tag
 <P> for example this is a html element.
8
New Elements in HTML5
9
Continued..
10
Continued..
11
Bdi Tag:
<ul>
<li>User <bdi>hrefs</bdi>: 60 points</li>
<li>User <bdi>jdoe</bdi>: 80 points</li>
<li>User <bdi> </bdi>: 90 points</li>
</ul>
 The HTML <bdi> tag is used on a span of text that is to be
isolated from its surroundings for the purposes of bidirectional
text formatting.
 This can be useful when displaying right-to-left text (such as
Arabic) inside left-to-right text (such as English) when the
text-direction is unknown.
 The <bdi> element allows you to honor the correct
directionality of text when this is unknown
12
Nav Tag :
 The <nav> tag defines a set of
navigation links.
 Notice that NOT all links of a
document should be inside a <nav>
element. The <nav> element is
intended only for major block
of navigation links.
13
Continued..
<nav>
<a href="/html/">HTML</a> |
<a href="/css/">CSS</a> |
<a href="/js/">JavaScript</a> |
<a href="/jquery/">jQuery</a>
</nav>
14
Output:
15
Canvas
 What is Canvas?
◦ The HTML5 <canvas> element is used to
draw graphics.
◦ The <canvas> element is only a container
(Container tags are tags that you place on
your site to trigger not one, but many
other tags) 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.
Convas Continued..
◦ A canvas is a rectangular area on an
HTML page, and it is specified with the
<canvas> element.
◦ Note: By default, the <canvas> element
has no border and no content.
 <canvas id="myCanvas" width="200"
height="100"></canvas>
 To add a border, use the style
attribute:
16
Example..
 <canvas id="myCanvas" width="200" height="100"
style="border:1px solid #c3c3c3;">
◦ Your browser does not support the HTML5 canvas tag.
</canvas>
<script>
◦ var c=document.getElementById("myCanvas");
◦ var ctx=c.getContext("2d");
◦ ctx.fillStyle="#FF0000";
◦ ctx.fillRect(0,0,150,75);
</script>
17
Output:
Write something in Canvas
<canvas id="e" width="200" height="200" style="border:1px
solid;"></canvas>
<script>
var canvas = document.getElementById("e");
var context = canvas.getContext("2d");
context.fillStyle = "blue";
context.font = "bold 45px Arial";
context.fillText("Zibri", 60, 100);
</script>
18
Output:
SVG
 What is SVG?
◦ SVG stands for Scalable Vector Graphics
◦ SVG is used to define vector-based
graphics for the Web
◦ SVG defines the graphics in XML format
◦ SVG graphics do NOT lose any quality if
they are zoomed or resized
◦ Every element and every attribute in SVG
files can be animated
19
SVG Advantages:
 Advantages of using SVG over other
image formats (like JPEG and GIF) are:
◦ SVG images can be created and edited with
any text editor
◦ SVG images can be
searched, indexed, scripted, and compressed
◦ SVG images are scalable
◦ SVG images can be printed with high quality
at any resolution
◦ SVG images are zoomable (and the image
can be zoomed without degradation)
20
SVG Example:
<svg width="300" height="200">
<polygon points="100,10 40,180 190,60 10,60 160,180"
style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;"
/>
Sorry, your browser does not support inline SVG.
</svg>
21
Output:
Differences Between SVG and
Canvas
 SVG is a language for describing 2D graphics in XML.
 Canvas draws 2D graphics, on the fly (with a
JavaScript).
 SVG is XML based, which means that every element is
available within the SVG DOM. You can attach
JavaScript event handlers for an element.
 In SVG, each drawn shape is remembered as an
object. If attributes of an SVG object are changed, the
browser can automatically re-render the shape.
 Canvas is rendered pixel by pixel. In canvas, once the
graphic is drawn, it is forgotten by the browser. If its
position should be changed, the entire scene needs to
be redrawn, including any objects that might have been
covered by the graphic.
22
Drag/Drop
 Drag and drop is a very common
feature. It is when you "grab" an object
and drag it to a different location.
 Some of browser not support this tag.
23
HTML code for Drag/Drop
<script>
function allowDrop(ev)
{
ev.preventDefault();
}
function drag(ev)
{
ev.dataTransfer.setData("Text",ev.target
.id);
}
function drop(ev)
{
ev.preventDefault();
var data=ev.dataTransfer.getData("Text");
ev.target.appendChild(document.getEleme
ntById(data));
}
</script>
<div id="div1"
ondrop="drop(event)"
ondragover="allowDrop(even
t)" style="border:solid #000;
height:100px;
width:400px;"></div>
<img id="drag1" src=“img”
draggable="true"
ondragstart="drag(event)"
width="336" height="69">
</body>
24
Output:
25
Geo-location
 The HTML5 Geolocation is used to get
the geographical position of a user.
 There is two methods of Geo-location
◦ Use for coordinates base location
◦ Use for find location on Google maps.
26
Coordinate base location :
<p id="demo">Click the button to get your coordinates:</p>
<button onclick="getLocation()">Try It</button>
<script>
var x=document.getElementById("demo");
function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition);
}
else{x.innerHTML="Geolocation is not supported by this browser.";}
}
function showPosition(position)
{
x.innerHTML="Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>
27
Geolocation in map
<p id="demo">Click the button to get
your position:</p>
<button onclick="getLocation()">Try
It</button>
<div id="mapholder"></div>
<script>
var
x=document.getElementById("dem
o");
function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentP
osition(showPosition,showError);
}
else{x.innerHTML="Geolocation is
not supported by this browser.";}
}
function showPosition(position)
{
var
latlon=position.coords.latitud
e+","+position.coords.longitu
de;
var
img_url="http://maps.googlea
pis.com/maps/api/staticmap?
center="
+latlon+"&zoom=14&size=40
0x300&sensor=false";
document.getElementById("
mapholder").innerHTML="<i
mg src='"+img_url+"'>";
}
28
Continued..
function showError(error)
{
switch(error.code)
{
case error.PERMISSION_DENIED:
x.innerHTML="User denied the request for Geolocation."
break;
case error.POSITION_UNAVAILABLE:
x.innerHTML="Location information is unavailable."
break;
case error.TIMEOUT:
x.innerHTML="The request to get user location timed out."
break;
case error.UNKNOWN_ERROR:
x.innerHTML="An unknown error occurred."
break;
}}
</script>
29
Video Tag:
 Until now, there has not been a standard for
showing a video/movie on a web page.
 Today, most videos are shown through a plug-
in (like flash). However, different browsers may
have different plug-ins.
 HTML5 defines a new element which specifies
a standard way to embed a video/movie on a
web page: the <video> element.
30
Syntax.
<video width="320" height="240" controls>
<source src="movie.mp4"
type="video/mp4">
Your browser does not support the video
tag.
</video>
• The control attribute adds video
controls, like play, pause, and volume.
31
Continue..
32
Output:
Audio Tag
 Until now, there has not been a standard for
playing audio files on a web page.
 Today, most audio files are played through a
plug-in (like flash). However, different browsers
may have different plug-ins.
 HTML5 defines a new element which specifies a
standard way to embed an audio file on a web
page: the <audio> element.
33
Syntax.
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<details>this song is good very good</details>
34
Output
:
Track Tag:
 Track tag use for where we using more than one video/audio
tag we use in track tag for embedded all audios.
 we can also say this container tag.
<track>
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</track>
35
Form handling
 HTML5 has the following new form elements:
◦ <datalist>
◦ <keygen>
◦ <output>
 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.
36
Example
 An <input> element with pre-defined values in a <datalist>:
<input list="browsers" name="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
 This feature works as in www.google.com for searching purpose.
37
Output:
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”></output>
</form>
38
Output:
Forms and input attributes
39
on
off
Autofocus use for focus
on specific input
<input type=“text”
autofocus ></input>
Autocomplete form and send
to the server
<form
action="demo_form.asp“
autocomplete="on">
Indicates that form will be
not validated on submit
<form
action="demo_form.asp"
novalidate>
Add new input in predefine form
<input form="form_id">
specifies the URL of the file
that will process the input
control when the form is
submitted.
<input formaction="URL"><input type="submit"
formenctype="multipart/for
m-data“>
multipart/form-data=No
characters are encoded
<input formmethod="get|post">
Get=Default. Appends the form-data
to the URL in name pairs:
URL?name=value&name=value
Post=Sends the form-data as an
HTTP post transaction
Continued..
40
<input type="image"
src="img_submit.gif"
alt="Submit"
width="48"
height="48">
For create a list for
datalist
<input
list="browsers(datalist-
ID)">Quantity (between 1 and
5):
<input type="number"
name="quantity" min="1"
max="5">
Select multiple images except
single image.
Select images: <input
type="file" name="img"
multiple>
SSE
 HTML5 Server-Sent Events allow a web page to
get updates from a server.
 Server-Sent Events - One Way Messaging
◦ A server-sent event is when a web page automatically
gets updates from a server.
◦ This was also possible before, but the web page
would have to ask if any updates were available. With
server-sent events, the updates come automatically.
◦ Examples: Facebook/Twitter updates, stock price
updates, news feeds, sport results, etc.
41
PHP
(PHP Hypertext Preprocessor)
42
Introduction:
 PHP is a server scripting
language, and is a powerful tool for
making dynamic and interactive Web
pages quickly.
 PHP is a widely-used, free, and
efficient alternative to competitors
such as Microsoft's ASP.
 A PHP script can be placed anywhere
in the document. 43
PHP syntax
 A PHP script starts with <?php and
ends with ?>:
 <?php
// PHP code goes here
?>
 The default file extension for PHP files
is ".php“
44
Continued..
 A PHP file normally contains HTML
tags, and some PHP scripting code.
 Below, we have an example of a simple
PHP file, with a PHP script that uses a
built-in PHP function "echo" to output the
text "Hello World!" on a web page:
 <?php
echo "Hello world!";
?>
 PHP is an acronym for "PHP Hypertext
Preprocessor"
45
Continued..
 PHP is a widely-used, open source
scripting language
 PHP scripts are executed on the
server
 PHP files can contain
text, HTML, CSS, JavaScript, and
PHP code
 PHP code are executed on the
server, and the result is returned to the
browser as plain HTML 46
What PHP can do?
 PHP can generate dynamic page content
 PHP can create, open, read, write, and
close files on the server
 PHP can collect form data
 PHP can send and receive cookies
 PHP can add, delete, modify data in your
database
 PHP can restrict users to access some
pages on your website
 PHP can encrypt data
47
PHP Features.
 PHP runs on various platforms
(Windows, Linux, Unix, Mac OS
X, etc.)
 PHP is compatible with almost all
servers used today (Apache, IIS, etc.)
 PHP supports a wide range of
databases
 PHP is free. Download it from the
official PHP resource: www.php.net
 PHP is easy to learn and runs 48
How to Install PHP?
 Install a web server on your own PC
 Use a Web Host With PHP Support
 If your server has activated support for
PHP you do not need to do anything.
 Just create some .php files, place them
in your web directory, and the server will
automatically parse them for you.
 You do not need to compile anything or
install any extra tools.
 Because PHP is free, most web hosts
offer PHP support.
49
Server side Page with PHP
<?php
echo “this is
php output”;
?>
</body>
50
<html>
<head>
</head>
<body>
<h1>this is html
tag</h1>
<h3>next output
is in php
language</h3
>
Definition of variables in php
 Variables are "containers" for storing
information
<?php
$x=5;
$y=6;
$z=$x+$y;
echo $z;
?>
51
Continued..
 As with algebra, PHP variables can be
used to hold values (x=5) or
expressions (z=x+y).
 A variable can have a short name (like
x and y) or a more descriptive name
(age, carname, total_volume).
52
◦ A variable starts with the $ sign, followed
by the name of the variable
◦ A variable name must start with a letter or
the underscore character
◦ A variable name cannot start with a
number
◦ A variable name can only contain alpha-
numeric characters and underscores (A-
z, 0-9, and _ )
◦ Variable names are case sensitive ($y
and $Y are two different variables)
53
Rules for PHP variables:
Creating(Declaring) PHP
Variables:
 PHP has no command for declaring a
variable.
 A variable is created the moment you first
assign a value to it:
 Example
◦ <?php
$txt="Hello world!";
$x=5;
$y=10.5;
?>
54
PHP is a Loosely Type
Language
 Example
◦ <?php
$txt="Hello world!";
$x=5;
$y=10.5;
?>
 In the example above, notice that we did not
have to tell PHP which data type the variable
is.
 PHP automatically converts the variable to
the correct data type, depending on its value.
55
PHP Variables Scope
 In PHP, variables can be declared
anywhere in the script.
 The scope of a variable is the part of
the script where the variable can be
referenced/used.
 PHP has three different variable
scopes:
◦ local
◦ global
◦ static
56
Local and Global Scope
 A variable declared outside a function
has a GLOBAL SCOPE and can only
be accessed outside a function.
 A variable declared within a function
has a LOCAL SCOPE and can only be
accessed within that function.
57
PHP
String
58
Strings in PHP
 A string is a sequence of characters, like "Hello
world!".
 The PHP strlen() function
◦ The strlen() function returns the length of a string, in
characters.
◦ The example below returns the length of the string
"Hello world!":
◦ strlen() is often used in loops or other functions, when
it is important to know when a string ends.
 Example
◦ <?php
echo strlen("Hello world!");
?>
59
PHP strpos() function
◦ The strpos() function is used to search for a
specified character or text within a string.
◦ If a match is found, it will return the character
position of the first match. If no match is
found, it will return FALSE.
◦ The example below searches for the text
"world" in the string "Hello world!":
 Example
◦ <?php
echo strpos("Hello world!","world");
?>
60
strcmp() Function
 The strcmp() function compares two
strings.
◦ Note: The strcmp() function is binary-safe
and case-sensitive.
 Example
◦ Compare two strings (case-sensitive):
◦ <?php
echo strcmp("Hello world!","Hello world!");
?>
 Syntax:
◦ strcmp(string1,string2)
61
Example 2:
 <?php
echo strcmp("Hello world!","Hello
world!"); // the two strings are equal
echo strcmp("Hello world!","Hello"); //
string1 is greater than string2
echo strcmp("Hello world!","Hello world!
Hello!"); // string1 is less than string2
?>
62
More String Functions:
63
server-side page using php
strings and variables
<html>
<head></head>
<body>
<?php
$a=“imran”;
$b=“shokat”;
echo $a.$b;
?>
<?php
echo strcmp("Hello
world!","Hello world!"); //
the two strings are equal
echo strcmp("Hello
world!","Hello"); // string1
is greater than string2
echo strpos("Hello
world!","world");
?>
</body>
</html>
64
65

Weitere ähnliche Inhalte

Was ist angesagt?

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 HTML5IT Geeks
 
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
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5Steven Chipman
 
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 DevelopmentTilak Joshi
 
Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtmlsagaroceanic11
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit RenderingAriya Hidayat
 
Reactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSReactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSMartin Hochel
 
DevFest Makerere html5 presentation by caesar mukama
DevFest Makerere html5 presentation by caesar mukamaDevFest Makerere html5 presentation by caesar mukama
DevFest Makerere html5 presentation by caesar mukamaEmily Karungi
 
Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011Zi Bin Cheah
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and ResourcesRon Reiter
 
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...Horacio Gonzalez
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginnersSingsys Pte Ltd
 
An Introduction To HTML5
An Introduction To HTML5An Introduction To HTML5
An Introduction To HTML5Robert Nyman
 
1. introduction to html5
1. introduction to html51. introduction to html5
1. introduction to html5JayjZens
 

Was ist angesagt? (20)

HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examples
 
HTML5
HTML5HTML5
HTML5
 
Html5 Basics
Html5 BasicsHtml5 Basics
Html5 Basics
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
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)
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
 
Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtml
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit Rendering
 
Reactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSReactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJS
 
HTML5 Tutorial
HTML5 TutorialHTML5 Tutorial
HTML5 Tutorial
 
HTML5 & CSS3
HTML5 & CSS3 HTML5 & CSS3
HTML5 & CSS3
 
DevFest Makerere html5 presentation by caesar mukama
DevFest Makerere html5 presentation by caesar mukamaDevFest Makerere html5 presentation by caesar mukama
DevFest Makerere html5 presentation by caesar mukama
 
Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
An Introduction To HTML5
An Introduction To HTML5An Introduction To HTML5
An Introduction To HTML5
 
1. introduction to html5
1. introduction to html51. introduction to html5
1. introduction to html5
 

Andere mochten auch

Be Less Terrible at the Business of Design
Be Less Terrible at the Business of DesignBe Less Terrible at the Business of Design
Be Less Terrible at the Business of DesignMeagan Fisher
 
Univ of phoenix year in review 2010
Univ of phoenix year in review 2010Univ of phoenix year in review 2010
Univ of phoenix year in review 2010Jim Lyons
 
Podcasting - Teaching with Technology Symposium
Podcasting - Teaching with Technology SymposiumPodcasting - Teaching with Technology Symposium
Podcasting - Teaching with Technology SymposiumTodd McKee
 
July Open Day at ERPNext
July Open Day at ERPNextJuly Open Day at ERPNext
July Open Day at ERPNextUmair Sayed
 
Schools & Colleges - Mobile Learning through mGyan
Schools & Colleges - Mobile Learning through mGyanSchools & Colleges - Mobile Learning through mGyan
Schools & Colleges - Mobile Learning through mGyanmGyan
 
Satish Vijaykumar at Startup Saturday
Satish Vijaykumar at Startup SaturdaySatish Vijaykumar at Startup Saturday
Satish Vijaykumar at Startup SaturdayHeadStart Foundation
 
US India investments and transactions flow monitor september 2010
US India investments and transactions flow monitor   september 2010US India investments and transactions flow monitor   september 2010
US India investments and transactions flow monitor september 2010privg
 
2010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-62010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-6Marakana Inc.
 
Economia política
Economia políticaEconomia política
Economia políticaGustavo Sosa
 
SharePoint 2013 - What's new for Devs - Belgian IT Bootcamp 2012
SharePoint 2013 - What's new for Devs - Belgian IT Bootcamp 2012SharePoint 2013 - What's new for Devs - Belgian IT Bootcamp 2012
SharePoint 2013 - What's new for Devs - Belgian IT Bootcamp 2012Joris Poelmans
 

Andere mochten auch (15)

Amitent
AmitentAmitent
Amitent
 
Be Less Terrible at the Business of Design
Be Less Terrible at the Business of DesignBe Less Terrible at the Business of Design
Be Less Terrible at the Business of Design
 
Univ of phoenix year in review 2010
Univ of phoenix year in review 2010Univ of phoenix year in review 2010
Univ of phoenix year in review 2010
 
Podcasting - Teaching with Technology Symposium
Podcasting - Teaching with Technology SymposiumPodcasting - Teaching with Technology Symposium
Podcasting - Teaching with Technology Symposium
 
July Open Day at ERPNext
July Open Day at ERPNextJuly Open Day at ERPNext
July Open Day at ERPNext
 
Schools & Colleges - Mobile Learning through mGyan
Schools & Colleges - Mobile Learning through mGyanSchools & Colleges - Mobile Learning through mGyan
Schools & Colleges - Mobile Learning through mGyan
 
Case - Storebrand.no
Case - Storebrand.noCase - Storebrand.no
Case - Storebrand.no
 
Satish Vijaykumar at Startup Saturday
Satish Vijaykumar at Startup SaturdaySatish Vijaykumar at Startup Saturday
Satish Vijaykumar at Startup Saturday
 
Yu-Shiksha
Yu-ShikshaYu-Shiksha
Yu-Shiksha
 
Impacto ambiental 2
Impacto ambiental 2Impacto ambiental 2
Impacto ambiental 2
 
US India investments and transactions flow monitor september 2010
US India investments and transactions flow monitor   september 2010US India investments and transactions flow monitor   september 2010
US India investments and transactions flow monitor september 2010
 
2010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-62010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-6
 
Liver
LiverLiver
Liver
 
Economia política
Economia políticaEconomia política
Economia política
 
SharePoint 2013 - What's new for Devs - Belgian IT Bootcamp 2012
SharePoint 2013 - What's new for Devs - Belgian IT Bootcamp 2012SharePoint 2013 - What's new for Devs - Belgian IT Bootcamp 2012
SharePoint 2013 - What's new for Devs - Belgian IT Bootcamp 2012
 

Ähnlich wie Html5

HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete ReferenceEPAM Systems
 
HTML5 Presentation
HTML5 PresentationHTML5 Presentation
HTML5 Presentationvs4vijay
 
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
 
Introduction to Web Technologies PPT.pptx
Introduction to Web Technologies PPT.pptxIntroduction to Web Technologies PPT.pptx
Introduction to Web Technologies PPT.pptxKunal Kalamkar
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3Gopi A
 
Introduction to html55
Introduction to html55Introduction to html55
Introduction to html55subrat55
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookScottperrone
 
Delhi student's day
Delhi student's dayDelhi student's day
Delhi student's dayAnkur Mishra
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5Manav Prasad
 
1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentation1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentationJohnLagman3
 
WordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWebWordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWebGeorge Kanellopoulos
 
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
 

Ähnlich wie Html5 (20)

Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
Web Apps
Web AppsWeb Apps
Web Apps
 
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete Reference
 
HTML5 Presentation
HTML5 PresentationHTML5 Presentation
HTML5 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
 
Introduction to Web Technologies PPT.pptx
Introduction to Web Technologies PPT.pptxIntroduction to Web Technologies PPT.pptx
Introduction to Web Technologies PPT.pptx
 
Html5 CSS3 jQuery Basic
Html5 CSS3 jQuery BasicHtml5 CSS3 jQuery Basic
Html5 CSS3 jQuery Basic
 
Word camp nextweb
Word camp nextwebWord camp nextweb
Word camp nextweb
 
Word camp nextweb
Word camp nextwebWord camp nextweb
Word camp nextweb
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
 
Introduction to html55
Introduction to html55Introduction to html55
Introduction to html55
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - Ebook
 
Delhi student's day
Delhi student's dayDelhi student's day
Delhi student's day
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentation1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentation
 
WordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWebWordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWeb
 
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
 
Html5
Html5Html5
Html5
 

Mehr von Zeeshan Ahmed

Rm presentation on research paper
Rm presentation on research paperRm presentation on research paper
Rm presentation on research paperZeeshan Ahmed
 
Dataware case study
Dataware case study Dataware case study
Dataware case study Zeeshan Ahmed
 
Project of management
Project of managementProject of management
Project of managementZeeshan Ahmed
 
Managemet project fall 2012
Managemet project fall 2012Managemet project fall 2012
Managemet project fall 2012Zeeshan Ahmed
 
Project of management
Project of managementProject of management
Project of managementZeeshan Ahmed
 
Macromedia flash presentation2
Macromedia flash presentation2Macromedia flash presentation2
Macromedia flash presentation2Zeeshan Ahmed
 
Assignment for sociology it 003 to 020
Assignment for sociology it  003 to 020Assignment for sociology it  003 to 020
Assignment for sociology it 003 to 020Zeeshan Ahmed
 
Education as institutions
Education as institutionsEducation as institutions
Education as institutionsZeeshan Ahmed
 
Family as an instution
Family as an instutionFamily as an instution
Family as an instutionZeeshan Ahmed
 
Religion as institution
Religion as institutionReligion as institution
Religion as institutionZeeshan Ahmed
 
Political institutions
Political institutionsPolitical institutions
Political institutionsZeeshan Ahmed
 

Mehr von Zeeshan Ahmed (15)

Rm presentation on research paper
Rm presentation on research paperRm presentation on research paper
Rm presentation on research paper
 
Dataware case study
Dataware case study Dataware case study
Dataware case study
 
Project of management
Project of managementProject of management
Project of management
 
Managemet project fall 2012
Managemet project fall 2012Managemet project fall 2012
Managemet project fall 2012
 
Project of management
Project of managementProject of management
Project of management
 
3 ds max
3 ds max3 ds max
3 ds max
 
Macromedia flash presentation2
Macromedia flash presentation2Macromedia flash presentation2
Macromedia flash presentation2
 
Assignment for sociology it 003 to 020
Assignment for sociology it  003 to 020Assignment for sociology it  003 to 020
Assignment for sociology it 003 to 020
 
Education as institutions
Education as institutionsEducation as institutions
Education as institutions
 
Family as an instution
Family as an instutionFamily as an instution
Family as an instution
 
Marriage
MarriageMarriage
Marriage
 
Religion as institution
Religion as institutionReligion as institution
Religion as institution
 
Political institutions
Political institutionsPolitical institutions
Political institutions
 
E transaction
E transactionE transaction
E transaction
 
PHP FUNCTIONS
PHP FUNCTIONSPHP FUNCTIONS
PHP FUNCTIONS
 

Kürzlich hochgeladen

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Kürzlich hochgeladen (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Html5

  • 2. Group Members: 2 Asfand Yar Khan (11051556- 009) Syed Awais Gillani (11051556-029) Abbas Rasheed (11051556-017) Haseeb Ahmad (11051556- 028)
  • 3. Presentation Agenda:  HTML5 ◦ Introduction of HTML5 ◦ Elements ◦ Canvas ◦ SVG ◦ Drag/Drop ◦ Geo-location ◦ Video ◦ Audio ◦ Form handling ◦ SSE 3
  • 4. Presentation Agenda Continued..  PHP ◦ Server side Page with PHP ◦ Issues will be discussed ◦ PHP syntax ◦ Defining variables in php  PHP String: ◦ Definition of Strings in PHP ◦ Complete server-side page using php strings and variables. 4
  • 6.  HTML5 is The New HTML Standard  HTML5 is designed to deliver almost everything you want to do online without requiring additional plug-ins. It does everything from animation to apps, music to movies, and can also be used to build complicated applications that run in your browser.  HTML5 is also cross-platform (it does not care whether you are using a tablet or a Smartphone, a net book, notebook or a Smart TV). Introduction of HTML5: 6
  • 7. Continued..  HTML5 can also be used to write web applications that still work when you are not online Some of the most interesting new features in HTML5: ◦ 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>(The <nav> tag defines a set of navigation links. NOT all links of a document should be inside a <nav> element. The <nav> element is intended only for major block of navigation links.) ◦ New form controls, like calendar, date, time, email, url, search 7
  • 8. Elements  HTML Element Syntax ◦ An HTML element starts with a start tag / opening tag ◦ An HTML element ends with an end tag / closing tag  <P> for example this is a html element. 8
  • 9. New Elements in HTML5 9
  • 12. Bdi Tag: <ul> <li>User <bdi>hrefs</bdi>: 60 points</li> <li>User <bdi>jdoe</bdi>: 80 points</li> <li>User <bdi> </bdi>: 90 points</li> </ul>  The HTML <bdi> tag is used on a span of text that is to be isolated from its surroundings for the purposes of bidirectional text formatting.  This can be useful when displaying right-to-left text (such as Arabic) inside left-to-right text (such as English) when the text-direction is unknown.  The <bdi> element allows you to honor the correct directionality of text when this is unknown 12
  • 13. Nav Tag :  The <nav> tag defines a set of navigation links.  Notice that NOT all links of a document should be inside a <nav> element. The <nav> element is intended only for major block of navigation links. 13
  • 14. Continued.. <nav> <a href="/html/">HTML</a> | <a href="/css/">CSS</a> | <a href="/js/">JavaScript</a> | <a href="/jquery/">jQuery</a> </nav> 14 Output:
  • 15. 15 Canvas  What is Canvas? ◦ The HTML5 <canvas> element is used to draw graphics. ◦ The <canvas> element is only a container (Container tags are tags that you place on your site to trigger not one, but many other tags) 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.
  • 16. Convas Continued.. ◦ A canvas is a rectangular area on an HTML page, and it is specified with the <canvas> element. ◦ Note: By default, the <canvas> element has no border and no content.  <canvas id="myCanvas" width="200" height="100"></canvas>  To add a border, use the style attribute: 16
  • 17. Example..  <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;"> ◦ Your browser does not support the HTML5 canvas tag. </canvas> <script> ◦ var c=document.getElementById("myCanvas"); ◦ var ctx=c.getContext("2d"); ◦ ctx.fillStyle="#FF0000"; ◦ ctx.fillRect(0,0,150,75); </script> 17 Output:
  • 18. Write something in Canvas <canvas id="e" width="200" height="200" style="border:1px solid;"></canvas> <script> var canvas = document.getElementById("e"); var context = canvas.getContext("2d"); context.fillStyle = "blue"; context.font = "bold 45px Arial"; context.fillText("Zibri", 60, 100); </script> 18 Output:
  • 19. SVG  What is SVG? ◦ SVG stands for Scalable Vector Graphics ◦ SVG is used to define vector-based graphics for the Web ◦ SVG defines the graphics in XML format ◦ SVG graphics do NOT lose any quality if they are zoomed or resized ◦ Every element and every attribute in SVG files can be animated 19
  • 20. SVG Advantages:  Advantages of using SVG over other image formats (like JPEG and GIF) are: ◦ SVG images can be created and edited with any text editor ◦ SVG images can be searched, indexed, scripted, and compressed ◦ SVG images are scalable ◦ SVG images can be printed with high quality at any resolution ◦ SVG images are zoomable (and the image can be zoomed without degradation) 20
  • 21. SVG Example: <svg width="300" height="200"> <polygon points="100,10 40,180 190,60 10,60 160,180" style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;" /> Sorry, your browser does not support inline SVG. </svg> 21 Output:
  • 22. Differences Between SVG and Canvas  SVG is a language for describing 2D graphics in XML.  Canvas draws 2D graphics, on the fly (with a JavaScript).  SVG is XML based, which means that every element is available within the SVG DOM. You can attach JavaScript event handlers for an element.  In SVG, each drawn shape is remembered as an object. If attributes of an SVG object are changed, the browser can automatically re-render the shape.  Canvas is rendered pixel by pixel. In canvas, once the graphic is drawn, it is forgotten by the browser. If its position should be changed, the entire scene needs to be redrawn, including any objects that might have been covered by the graphic. 22
  • 23. Drag/Drop  Drag and drop is a very common feature. It is when you "grab" an object and drag it to a different location.  Some of browser not support this tag. 23
  • 24. HTML code for Drag/Drop <script> function allowDrop(ev) { ev.preventDefault(); } function drag(ev) { ev.dataTransfer.setData("Text",ev.target .id); } function drop(ev) { ev.preventDefault(); var data=ev.dataTransfer.getData("Text"); ev.target.appendChild(document.getEleme ntById(data)); } </script> <div id="div1" ondrop="drop(event)" ondragover="allowDrop(even t)" style="border:solid #000; height:100px; width:400px;"></div> <img id="drag1" src=“img” draggable="true" ondragstart="drag(event)" width="336" height="69"> </body> 24
  • 26. Geo-location  The HTML5 Geolocation is used to get the geographical position of a user.  There is two methods of Geo-location ◦ Use for coordinates base location ◦ Use for find location on Google maps. 26
  • 27. Coordinate base location : <p id="demo">Click the button to get your coordinates:</p> <button onclick="getLocation()">Try It</button> <script> var x=document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else{x.innerHTML="Geolocation is not supported by this browser.";} } function showPosition(position) { x.innerHTML="Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; } </script> 27
  • 28. Geolocation in map <p id="demo">Click the button to get your position:</p> <button onclick="getLocation()">Try It</button> <div id="mapholder"></div> <script> var x=document.getElementById("dem o"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentP osition(showPosition,showError); } else{x.innerHTML="Geolocation is not supported by this browser.";} } function showPosition(position) { var latlon=position.coords.latitud e+","+position.coords.longitu de; var img_url="http://maps.googlea pis.com/maps/api/staticmap? center=" +latlon+"&zoom=14&size=40 0x300&sensor=false"; document.getElementById(" mapholder").innerHTML="<i mg src='"+img_url+"'>"; } 28
  • 29. Continued.. function showError(error) { switch(error.code) { case error.PERMISSION_DENIED: x.innerHTML="User denied the request for Geolocation." break; case error.POSITION_UNAVAILABLE: x.innerHTML="Location information is unavailable." break; case error.TIMEOUT: x.innerHTML="The request to get user location timed out." break; case error.UNKNOWN_ERROR: x.innerHTML="An unknown error occurred." break; }} </script> 29
  • 30. Video Tag:  Until now, there has not been a standard for showing a video/movie on a web page.  Today, most videos are shown through a plug- in (like flash). However, different browsers may have different plug-ins.  HTML5 defines a new element which specifies a standard way to embed a video/movie on a web page: the <video> element. 30
  • 31. Syntax. <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> Your browser does not support the video tag. </video> • The control attribute adds video controls, like play, pause, and volume. 31
  • 33. Audio Tag  Until now, there has not been a standard for playing audio files on a web page.  Today, most audio files are played through a plug-in (like flash). However, different browsers may have different plug-ins.  HTML5 defines a new element which specifies a standard way to embed an audio file on a web page: the <audio> element. 33
  • 34. Syntax. <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> <details>this song is good very good</details> 34 Output :
  • 35. Track Tag:  Track tag use for where we using more than one video/audio tag we use in track tag for embedded all audios.  we can also say this container tag. <track> <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> Your browser does not support the video tag. </video> </track> 35
  • 36. Form handling  HTML5 has the following new form elements: ◦ <datalist> ◦ <keygen> ◦ <output>  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. 36
  • 37. Example  An <input> element with pre-defined values in a <datalist>: <input list="browsers" name="browsers"> <datalist id="browsers"> <option value="Internet Explorer"> <option value="Firefox"> <option value="Chrome"> <option value="Opera"> <option value="Safari"> </datalist>  This feature works as in www.google.com for searching purpose. 37 Output:
  • 38. 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”></output> </form> 38 Output:
  • 39. Forms and input attributes 39 on off Autofocus use for focus on specific input <input type=“text” autofocus ></input> Autocomplete form and send to the server <form action="demo_form.asp“ autocomplete="on"> Indicates that form will be not validated on submit <form action="demo_form.asp" novalidate> Add new input in predefine form <input form="form_id"> specifies the URL of the file that will process the input control when the form is submitted. <input formaction="URL"><input type="submit" formenctype="multipart/for m-data“> multipart/form-data=No characters are encoded <input formmethod="get|post"> Get=Default. Appends the form-data to the URL in name pairs: URL?name=value&name=value Post=Sends the form-data as an HTTP post transaction
  • 40. Continued.. 40 <input type="image" src="img_submit.gif" alt="Submit" width="48" height="48"> For create a list for datalist <input list="browsers(datalist- ID)">Quantity (between 1 and 5): <input type="number" name="quantity" min="1" max="5"> Select multiple images except single image. Select images: <input type="file" name="img" multiple>
  • 41. SSE  HTML5 Server-Sent Events allow a web page to get updates from a server.  Server-Sent Events - One Way Messaging ◦ A server-sent event is when a web page automatically gets updates from a server. ◦ This was also possible before, but the web page would have to ask if any updates were available. With server-sent events, the updates come automatically. ◦ Examples: Facebook/Twitter updates, stock price updates, news feeds, sport results, etc. 41
  • 43. Introduction:  PHP is a server scripting language, and is a powerful tool for making dynamic and interactive Web pages quickly.  PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.  A PHP script can be placed anywhere in the document. 43
  • 44. PHP syntax  A PHP script starts with <?php and ends with ?>:  <?php // PHP code goes here ?>  The default file extension for PHP files is ".php“ 44
  • 45. Continued..  A PHP file normally contains HTML tags, and some PHP scripting code.  Below, we have an example of a simple PHP file, with a PHP script that uses a built-in PHP function "echo" to output the text "Hello World!" on a web page:  <?php echo "Hello world!"; ?>  PHP is an acronym for "PHP Hypertext Preprocessor" 45
  • 46. Continued..  PHP is a widely-used, open source scripting language  PHP scripts are executed on the server  PHP files can contain text, HTML, CSS, JavaScript, and PHP code  PHP code are executed on the server, and the result is returned to the browser as plain HTML 46
  • 47. What PHP can do?  PHP can generate dynamic page content  PHP can create, open, read, write, and close files on the server  PHP can collect form data  PHP can send and receive cookies  PHP can add, delete, modify data in your database  PHP can restrict users to access some pages on your website  PHP can encrypt data 47
  • 48. PHP Features.  PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)  PHP is compatible with almost all servers used today (Apache, IIS, etc.)  PHP supports a wide range of databases  PHP is free. Download it from the official PHP resource: www.php.net  PHP is easy to learn and runs 48
  • 49. How to Install PHP?  Install a web server on your own PC  Use a Web Host With PHP Support  If your server has activated support for PHP you do not need to do anything.  Just create some .php files, place them in your web directory, and the server will automatically parse them for you.  You do not need to compile anything or install any extra tools.  Because PHP is free, most web hosts offer PHP support. 49
  • 50. Server side Page with PHP <?php echo “this is php output”; ?> </body> 50 <html> <head> </head> <body> <h1>this is html tag</h1> <h3>next output is in php language</h3 >
  • 51. Definition of variables in php  Variables are "containers" for storing information <?php $x=5; $y=6; $z=$x+$y; echo $z; ?> 51
  • 52. Continued..  As with algebra, PHP variables can be used to hold values (x=5) or expressions (z=x+y).  A variable can have a short name (like x and y) or a more descriptive name (age, carname, total_volume). 52
  • 53. ◦ A variable starts with the $ sign, followed by the name of the variable ◦ A variable name must start with a letter or the underscore character ◦ A variable name cannot start with a number ◦ A variable name can only contain alpha- numeric characters and underscores (A- z, 0-9, and _ ) ◦ Variable names are case sensitive ($y and $Y are two different variables) 53 Rules for PHP variables:
  • 54. Creating(Declaring) PHP Variables:  PHP has no command for declaring a variable.  A variable is created the moment you first assign a value to it:  Example ◦ <?php $txt="Hello world!"; $x=5; $y=10.5; ?> 54
  • 55. PHP is a Loosely Type Language  Example ◦ <?php $txt="Hello world!"; $x=5; $y=10.5; ?>  In the example above, notice that we did not have to tell PHP which data type the variable is.  PHP automatically converts the variable to the correct data type, depending on its value. 55
  • 56. PHP Variables Scope  In PHP, variables can be declared anywhere in the script.  The scope of a variable is the part of the script where the variable can be referenced/used.  PHP has three different variable scopes: ◦ local ◦ global ◦ static 56
  • 57. Local and Global Scope  A variable declared outside a function has a GLOBAL SCOPE and can only be accessed outside a function.  A variable declared within a function has a LOCAL SCOPE and can only be accessed within that function. 57
  • 59. Strings in PHP  A string is a sequence of characters, like "Hello world!".  The PHP strlen() function ◦ The strlen() function returns the length of a string, in characters. ◦ The example below returns the length of the string "Hello world!": ◦ strlen() is often used in loops or other functions, when it is important to know when a string ends.  Example ◦ <?php echo strlen("Hello world!"); ?> 59
  • 60. PHP strpos() function ◦ The strpos() function is used to search for a specified character or text within a string. ◦ If a match is found, it will return the character position of the first match. If no match is found, it will return FALSE. ◦ The example below searches for the text "world" in the string "Hello world!":  Example ◦ <?php echo strpos("Hello world!","world"); ?> 60
  • 61. strcmp() Function  The strcmp() function compares two strings. ◦ Note: The strcmp() function is binary-safe and case-sensitive.  Example ◦ Compare two strings (case-sensitive): ◦ <?php echo strcmp("Hello world!","Hello world!"); ?>  Syntax: ◦ strcmp(string1,string2) 61
  • 62. Example 2:  <?php echo strcmp("Hello world!","Hello world!"); // the two strings are equal echo strcmp("Hello world!","Hello"); // string1 is greater than string2 echo strcmp("Hello world!","Hello world! Hello!"); // string1 is less than string2 ?> 62
  • 64. server-side page using php strings and variables <html> <head></head> <body> <?php $a=“imran”; $b=“shokat”; echo $a.$b; ?> <?php echo strcmp("Hello world!","Hello world!"); // the two strings are equal echo strcmp("Hello world!","Hello"); // string1 is greater than string2 echo strpos("Hello world!","world"); ?> </body> </html> 64
  • 65. 65