HTML5 Step by Step - Ebook

Embed Size (px)

Citation preview

  • 7/27/2019 HTML5 Step by Step - Ebook

    1/98

    TechnologiesTrue Vision

    http://www.truevisiontech.com/http://www.truevisiontech.com/http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    2/98

    INTRODUCTION

    2

    HTML 5 Gaining interest to become a Trend

    3D graphics , effects and HTML5

    MULTIMEDIA AND HTML5

    HTML 5 SEMANTICS and HTML5 FORMS

    3

    7

    49

    53

    1

    2

    3

    4

    Page No.Title

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    3/98

    HTML 5 Gaining interest to become a Trend

    Todays designers when asked about HTML5 do hesitate to answer because of the lack

    of knowledge about HTML5.

    Also many times a question arises in many peoples mind that whats the difference

    between HTML and HTMl5. Many people think its just the updated version of HTML. This

    is also just due to the lack of knowledge about HTML5.

    Before discussing about HTML5, lets have a look at some of the wrong notions about it.

    3

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    4/98

    HTML 5 Gaining interest to become a Trend

    Many people think why we shall use HTML5 if it isnt working on the old version

    browsers?

    1

    2

    4

    Yes, thats true that HTML5 is not supported by older versions of browsers, but instead of using

    HTML5 for the complete website, you can at least use some features of it. You may not get support

    for HTML5 but cavn get support for some of it features.

    While thinking of HTML, the rst thing that comes in your mind is a variety of tags and after

    that the < > brackets.

    Thats a truth that HTML is made up of this tags and < > brackets only but HTML5 gives an in depth meaning

    of this < > brackets as well as tags. HTML5 denes the interaction of this < > brackets with the JavaScript

    through DOM (Document Object Model).

    3 People think that lets redesign our website with HTML5. But then due to lack of knowledge,

    they dont use it. But actually you dont need to do so. You can use that old HTML with

    HTML5.

    No one would disagree on this that HTML is the best markup language ever. And HTML5 is built on that

    HTML only with some more features. So it does support the features and will work well on the website

    developed on HTML.

    4 Is it very easy to get started with HTML5?

    Yes, it is very easy to get started with HTML5. HTML supported many dierent types of DOCTYPE but HTML5

    just supports one i.e.

    Whether you want to draw on a canvas, play video, design better forms, or build web applications that work

    oine, youll nd that HTML5 is already well-supported. Firefox, Safari, Chrome, Opera, and mobile brows-

    ers already support canvas, video, geolocation, local storage, and more. Google already supports micro data

    annotations. Even Microsoft rarely known for blazing the trail of standards support supports most

    HTML5 features in Internet Explorer 9.

    Now after discussing about the wrong notions lets discuss about what is HTML5 and why was it required to

    be developed.

    HTML5 is a result of the co-operation between the W3C (World Wide Web Consortium) working on XHTML

    and WHATWG (Web Hypertext Application Technology Working Group) working on web forms and applica-

    tions. Its core aim is to improve the language that supports multimedia easily without using the scripting.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    5/98

    Reasons why HTML5 was developed are:

    HTML 5 Gaining interest to become a Trend

    5

    Reduce the requirement of external plugins.

    Better error handling.

    Such markup that replaces the dicult scripting. After reasons, lets come upon the new features that wereintroduced in HTML5 are:

    New Markup

    New APIs

    Support for local storage

    Error Handling

    Now lets look at each and every feature in detail. Lets start withNew Markup.

    In HTML5, many tags deprecated in HTML are removed like , , , , etc.

    Some many common blocks for which tag was to be used, now is developed using the tags named

    after the name of the block. Like for footer i.e. the bottom of each and every webpage can now be written

    in tag. And this tags are also called as Structural tags.

    For playing an audio or displaying a video, we used tag but now we have individual tags for both

    playing an audio and displaying a video i.e. and tag respectively.

    Some new form tags are also introduced like , , , etc.

    The tag for immediate mode 2D drawing.

    After discussing on the new markups designed, lets discuss upon theNew APIs introduced in HTML5.

    Timed media playback

    Oine Web ApplicationsDocument editing

    Drag-and-drop

    Cross-document messaging

    Browser history management

    MIME type and protocol handler registration

    Micro data

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    6/98

    HTML 5 Gaining interest to become a Trend

    So this was a nut shell of the whole HTML5 and its features but you wouldnt like it if I just listed the features. So

    I wont disappoint you. Here is the detail description about each and every markup designed or API introduced.

    6

    Web Storage, a key-value pair storage framework that provides behavior similar to cookies but with larger

    storage capacity and improved API.

    Scalable Vector GraphicsGeoLocation - The most important API introduced.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    7/98

    3D graphics , effects and HTML5

    tag

    To create a simple canvas:

    Output :

    Canvas Sample 1

    Hello here's the rst example of canvas

    Hello

    7

    The canvas tag is used to draw 2d objects. Its just draws the outline. For the actual graphics you need to use

    scripts with it.

    Syntax:

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    8/98

    3D graphics , effects and HTML5

    element

    SVG RECTANGLE: tag

    8

    Canvas with JavaScript is used to draw lines, circles, to write text, to show gradients, and to show images in

    the canvas.

    SVG stands for Scalable Vector Graphics.

    SVG is a vector graphics format based on XML means SVG is an XML language, similar to XHTML, which can

    be used to draw graphics.

    SVG images and their behaviors are dened in XML le. As XML, SVG les can be created and edited in text

    editors.

    SVG can be used to develop lines, shapes, animated objects, to write text, etc.

    It can be used to create an image either by specifying all the lines and shapes necessary, by modifying

    already existing raster images, or by a combination of both.

    The image and its components can also be transformed, composited together, or ltered to change its

    appearance completely.

    SVG supports some predened shapes in the form of elements. They are:

    To create a rectangle we use tag.

    Syntax:

    Rectangle

    Circle

    Ellipse Line

    Polyline

    Polygon

    Path

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    9/98

    3D graphics , effects and HTML5

    9

    Example of a Simple Rectangle.

    Canvas Sample 1

    Hello here's the rst example of canvas

    Hello

    Output :

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    10/98

    3D graphics , effects and HTML5

    10

    SVG CIRCLE: tag

    Simple Circle

    width and height : Denes the dimensions of the rectangle.

    CSS ll : used to ll color in the rectangle.

    CSS stroke : used to dene the color of the border.

    CSS stroke width: used to dene the width of the border.

    CSS ll opacity: used to provide opacity (transparency) to the color lled in the rectangle.

    CSS stroke opacity: used to provide opacity (transparency) to the color of the border in the rectangle.

    x and y: denes the position of the rectangle on the web browser.

    The attributes of the tag are:

    To create a circle we use tag.

    Example of a Simple Circle.

    Output :

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    11/98

    3D graphics , effects and HTML5

    11

    SVG ELLIPSE: tag

    Simple Ellipse Example

    cx and cy: These attributes are dened to set the center of the circle.

    r: It denes the radius of the circle.

    CSS ll: used to ll color in the circle.

    CSS stroke: Used to dene the color of the border around the circle.

    CSS stroke-width: Used to dene the width of the border around the circle.

    The attributes that can be used with tag are:

    To create an ellipse we use tag.

    Example of a Simple Ellipse.

    Output :

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    12/98

    3D graphics , effects and HTML5

    12

    SVG LINE: tag

    Simple Line

    To create a line we use tag.

    Example of a Simple Line.

    cx and cy:These attributes dene the center of the ellipse.

    rx and ry:These attributes dene the radius of the ellipse in horizontal as well as vertical direction respectively.

    CSS ll: Used to ll the color in ellipse. By default the color is black.

    CSS stroke: Used to dene the color of the border around the ellipse.

    CSS stroke width: Used to dene the width of the border around the ellipse.

    The attributes used with tag are:

    Output :

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    13/98

    3D graphics , effects and HTML5

    13

    SImple Polygon

  • 7/27/2019 HTML5 Step by Step - Ebook

    14/98

    3D graphics , effects and HTML5

    14

    The attributes used with tag are:

    tag is used to create a single straight line. The tag is used to create any shape that consists

    of only straight lines.

    Example of a Simple Polyline.

    points:This attribute is used to dene the points of the line on the polygon. The shape of the polygon is completely

    dependent on the points you dene.

    CSS ll:This attribute is used to ll color in the polygon.

    CSS stroke: This attribute is used to dene the color of the border of the polygon.

    CSS stroke-width: This attribute is used to dene the width of the border of the polygon.

    style="ll:rgb(0,255,200)"/>

    Output :

    SVG POLYLINE: tag

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    15/98

    3D graphics , effects and HTML5

    15

    tag is used to create a specic path.

    tag uses following commands to create a path.

    M = moveto

    L = lineto

    H = horizontal lineto

    Output :

    SVG PATH: tag

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    16/98

    3D graphics , effects and HTML5

    16

    Example of a Simple path.

    V = vertical lineto

    C = curveto

    S = smooth curveto

    Q = quadratic Bzier curve

    T = smooth quadratic Bzier curveto

    A = elliptical Arc

    Z = closepath

    Simple PATH

    Output :

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    17/98

    3D graphics , effects and HTML5

    17

    d: Its the most important attribute of the tag as it gives the direction in which the path is moving.

    CSS stroke: This attribute is used to dene the border. Also if this is not used nothing gets displayed.

    CSS ll: This attribute is used to ll color in the shape created by the path.

    CSS stroke-width: This attribute is used to dene the width of the border.

    Example of a Simple path.

    As coding becomes very complex in tag, it is better to use SVG editors to create objects.

    Inkscape is one of the well known SVG editors.

    tag is used to display text using SVG.

    Example of a Simple Text.

    Simple Text

    Hey Guys!!! Its Party Time

    Output :

    SVG TEXT: tag

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    18/98

    3D graphics , effects and HTML5

    18

    stroke To dene the color of the border, stroke is used.

    stroke To dene the color of the border, stroke is used.

    SVG oers a wide range of stroke properties. They are:

    Simple Stroke

    Output :

    SVG Stroke Attribute:

    Example of stroke is:

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    19/98

    3D graphics , effects and HTML5

    19

    stroke-linecap To dene dierent types of endings to an open path, stroke-linecap is used. The dierent types

    are butt, round and square.

    Simple Stroke-Width

    Output :

    Example of stroke-width is:

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    20/98

    3D graphics , effects and HTML5

    20

    stroke-dasharray To dene dierent types of dashed lines, stroke-dasharray is used.

    Simple Stroke-Linecap

    Output :

    Example of stroke-linecap:

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    21/98

    3D graphics , effects and HTML5

    21

    SVG lter eects are eects applied to Scalable Vector Graphics (SVG) les.

    A lter eect is a graphical operation that is applied to an element as it is drawn into the document.

    It is an image-based eect, in that it takes zero or more images as input, a number of parameters specic to

    the eect, and then produces an image as output.

    The output image is either rendered into the document instead of the original element, used as an input

    image to another lter eect, or provided as a CSS image value.

    Example of stroke-dasharray is:

    Output :

    SVG Filters

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    22/98

    3D graphics , effects and HTML5

    22

    A simple example of a lter eect is a "ood". It takes no image inputs but has a parameter dening a color.

    The eect produces an output image that is completely lled with the given color.

    SVG supports following lters:

    As the name suggests it blends two or more images.SVG supports following lters:

    In a more technical way it can be dened as: This lter composites two objects together using commonly

    used imaging software blending modes. It performs a pixel-wise combination of two input images.

    feBlend

    feColorMatrix

    feComponentTransfer

    feComposite

    feConvolveMatrix

    feDiuseLighting

    feDisplacementMap

    feFlood

    feGaussianBlur

    feImage

    feMerge

    feMorphology

    feOset

    feSpecularLighting

    feTile

    feTurbulence

    feDistantLight

    fePointLight

    feSpotLight

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    SVG Filter Primitive and :

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    23/98

    3D graphics , effects and HTML5

    23

    Normal Mode and

    The modes of primitive are:

    SVG Filter Primitive and :

    normal (default)

    multiply

    screen

    darken

    lighten

    The attributes of are:

    mode: denes the mode of .

    in: denes the rst image input to the blending operation.

    in2: dene the second image input to the blending operation.

    Then there are many presentation attributes.

    style: used to dene the inline CSS.

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    24/98

    3D graphics , effects and HTML5

    24

    Output :

    SVG Filter Primitive :

    The element is used to create blur eects.

    The attributes for are:

    in: denes the image input to the blurring operation.

    stdDeviation:The standard deviation for the blur operation. If two numbers are provided, the rst number

    represents a standard deviation value along the x-axis of the coordinate system established by attribute

    primitive Units on the element. The second value represents a standard deviation in Y. If one number

    is provided, then that value is used for both X and Y.A value of zero disables the eect of the given lter primitive.

    There are many presentation attributes also.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    25/98

    3D graphics , effects and HTML5

    25

    Output :

    Example for Filter Primitive :

    Example

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    26/98

    3D graphics , effects and HTML5

    26

    Output :

    SVG Filter Primitive

    Example For Filter Primitive is:

    This lter primitive can refer to an external image or can be a reference to another piece of SVG. It produces

    an image similar to the built-in image source Source Graphic except that the graphic comes from an exter-nal source.

    If the xlink:href references a stand-alone image resource such as a JPEG, PNG or SVG le, then the image

    resource is rendered according to the behavior of the element;

    Example

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    27/98

  • 7/27/2019 HTML5 Step by Step - Ebook

    28/98

    3D graphics , effects and HTML5

    28

    Example of with all the types:

    UnlteredMatrixSaturateHueRotateLuminance

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    29/98

    3D graphics , effects and HTML5

    29

    Output :

    SVG Filter Primitive , , :

    The SVG feMerge element is used to create image layers on top of each other.Each feMerge element can have any number of feMergeNode sub-elements.

    The SVG lter primitive creates a rectangle lled with the color and opacity values from proper-

    ties ood-color and ood-opacity.

    The rectangle is as large as the lter primitive subregion established by the x, y, width and height attrib-

    utes on the feFlood element.

    The SVG lter performs the combination of the two input images pixel-wise in image space

    using one of the Porter-Du [PORTERDUFF] compositing operations: over, in, atop, out, xor.

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    30/98

    3D graphics , effects and HTML5

    30

    Hello!/html>

    Example of SVG Filter

    , , and :

    Output :

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    31/98

    3D graphics , effects and HTML5

    31

    erode (thinning)

    dilate (fattening)

    orphology operator="dilate" in="SourceGraphic" radius="4" />

    ERODE

    DILATE

    SVG Filter Primitive :

    Example for

    The SVG feMorphology element is used to "fattening" or "thinning" a source graphic.

    The operator attribute denes whether to erode or dilate the source graphic.

    The operator attribute can take one of the following values:

    The radius attribute denes the radius for the operation.

    If two numbers are specied, the rst number is the x-radius and the second number is the y-radius. If one

    number is specied, then that value is used for both x and y. Default is 0

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    32/98

    3D graphics , effects and HTML5

    32

    feFuncR transfer function for the red component of the input graphic

    feFuncG transfer function for the green component of the input graphic

    feFuncB transfer function for the blue component of the input graphic

    feFuncA transfer function for the alpha component of the input graphic

    If more than one transfer function element of the same kind is specied, the last occurrence is to be used.

    If any of the transfer function elements are unspecied, the feComponentTransfer must be processed as ifthose transfer function elements were specied with their type attributes set to 'identity'.

    Type: Indicates the type of component transfer function.

    This lter primitive performs component-wise remapping of data for every pixel.

    It allows operations like brightness adjustment, contrast adjustment, color balance or thresholding.

    The child elements of a feComponentTransfer element specify the transfer functions for the four channels:

    The following rules apply to the processing of the feComponentTransfer element:

    The attributes of the sub elements are:

    Output :

    SVG Filter Primitive :

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    33/98

    3D graphics , effects and HTML5

    33

    Example for Filter Primitive :

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    34/98

    3D graphics , effects and HTML5

    34

    Identity

    TableLookup

    LinearFunc

    GammaFunc

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    35/98

    3D graphics , effects and HTML5

    35

    The 'feTile' lter eect can be used with an input to create a tiled pattern that lls the lter area.

    Example for Filter Primitive :

    SVG Filter Primitive :

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    36/98

    3D graphics , effects and HTML5

    36

    Example of SVG Filter :

    Output :

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    37/98

    3D graphics , effects and HTML5

    37

    These lter primitives dene light source as a point or a spot or light source from a distance.

    The attributes of the are x , y and z that denes the position of the light source in respect to

    x, y and z direction.

    The attributes of the are:

    The attributes of the are

    This lter primitive lights a source graphic using the alpha channel as a bump map. The resulting image is

    an RGBA image based on the light color.

    SVG Filter Primitive , and :

    SVG Filter Primitive :

    x , y , z denes the position of the light source with respect to x , y and z direction resp.

    pointsAtX denes X location in the coordinate system established by attribute primitiveUnits on the

    lter element of the point at which the light source is pointing.

    pointsAtY denes Y location in the coordinate system established by attribute primitiveUnits on thelter element of the point at which the light source is pointing.

    pointsAtZ

    specularExponent denes Exponent value controlling the focus for the light source.

    limitingConeAngle denes A limiting cone which restricts the region where the light is projected. No

    light is projected outside the cone. LimitingConeAngle represents the angle in degrees between the

    spot light axis and the spot light cone.

    Azimuth: Direction angle for the light source on the XY plane (clockwise), in degrees from the x axis.

    Elevation: Direction angle for the light source from the XY plane towards the z axis, in degrees.

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    38/98

    3D graphics , effects and HTML5

    38

    Example for Filter and :

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    39/98

    3D graphics , effects and HTML5

    39

    Example For and :

    Output:

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    40/98

    3D graphics , effects and HTML5

    40

    s

    This lter primitive lights an image using the alpha channel as a bump map.

    Output:

    SVG Filter Primitive :

    Example for and :

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    41/98

    3D graphics , effects and HTML5

    41

    Output:

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    42/98

    3D graphics , effects and HTML5

    42

    Output:

    Example for with

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    43/98

    3D graphics , effects and HTML5

    43

    Example of and

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    44/98

    3D graphics , effects and HTML5

    44

    Output:

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    45/98

    3D graphics , effects and HTML5

    45

    A gradient is a gradual transition from one color to another. A lter eect is a graphical operation that is

    Gradients come in two basic forms: linear and radial. The type of gradient applied is determined by the

    element you use.

    SVG Gradients:

    The element is used to dene a linear gradient.

    The element must be nested within a tag. The tag is short for denitions

    and contains denition of special elements (such as gradients).

    Linear gradients can be dened as horizontal, vertical or angular gradients:

    SVG Linear Gradient :

    Example For Linear Horizontal Gradients:

    Horizontal gradients are created when y1 and y2 are equal and x1 and x2 dier.

    Vertical gradients are created when x1 and x2 are equal and y1 and y2 dier.

    Angular gradients are created when x1 and x2 dier and y1 and y2 dier.

    Linear Horizontal Gradient

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    46/98

    3D graphics , effects and HTML5

    46

    Example For Linear Vertical Gradients:

    Linear Horizontal Gradient

    Output:

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    47/98

    The element is used to dene a radial gradient.

    The element must be nested within a tag. The tag is short for denitions

    and contains denition of special elements (such as gradients).

    Radial Gradient

    Output:

    SVG Radial Gradient :

    Example For

    3D graphics , effects and HTML5

    47

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    48/98

    Output:

    3D graphics , effects and HTML5

    48

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    49/9849

    MULTIMEDIA AND HTML5

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    50/98

    With HTML5 we can play video and audio very easily.

    There are 2 elements in HTML5 That come under multimedia

    Today, most videos are shown through a plug-in (like ash). However, dierent browsers may have dierent

    plug-ins.

    HTML5 denes a new element which species a standard way to embed a video/movie on a web page: the

    element.

    tag

    Example of a tag:

    : Denes the source of the video.

    : Denes text tracks in media players

    Output:

    MULTIMEDIA AND HTML5

    50

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    51/98

    The attributes of the tag are:

    tag

    Example of tag:

    Height: Denes the height of the window in which the video is displayed.

    Width: Denes the width of the window in which the video is displayed.

    Control: Displays the controls like: PAUSE, PLAY and VOLUME.

    The attributes of the tag are:

    Today, most audios are shown through a plug-in (like ash). However, dierent browsers may have dierent

    plug-ins.

    HTML5 denes a new element which species a standard way to embed a audio on a web page: the

    element.

    The sub elements of tag are:

    Src: Denes the source of the video le.

    Type: Denes the MIME type of the video like video/mp4 or video/ ogg or video/webM.

    : Denes the source of the audio.

    MULTIMEDIA AND HTML5

    51

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    52/98

    The attribute of the tag are:

    Control: Displays the controls like: PAUSE, PLAY and VOLUME.

    The attribute of the tag are:

    Src: Denes the source of the audio le.

    Type: Denes the MIME type of the audio like audio/mpeg or audio/ogg or audio/wav.

    Output:

    MULTIMEDIA AND HTML5

    52

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    53/98

    HTML 5 SEMANTICS and HTML5 FORMS

    53

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    54/98

    HTML5 has introduced many new semantics to easily develop the format of the webpage.

    Semantics dene the meaning of the block.

    The new elements that are dened as the semantics are:

    : The tag is used to dene the header of the webpage. It generally contains the logo or the title

    that denes the purpose of the webpage.

    : The tag is used to dene the footer of the webpage. It generally contains the information about

    the author, the copyright conditions, links to terms of use, contact information, etc.

    : The element denes a set of navigation links. The element is intended for large blocks of naviga-

    tion links. However, not all links in a document should be inside a element!

    : The element denes the title of the content written in the page.

    : The element is the actual body of the webpage. It contains the actual content for which the web-page is made. It contains data, pictures, links etc.

    : The element denes some content aside from the content it is placed in (like a sidebar). It is gener-

    ally used for vertical navigation, news, updates etc.

    : The denes a caption for the gures.

    : The element is used to dene the gure and diagrams in the content.

    54

    HTML 5 SEMANTICS and HTML5 FORMS

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    55/98

    Semantic Elements in HTML5

    HELLO EVERYONE!!! GOOD MORNING

    Home

    About Us

    Gallery

    Contact Us

    Welcome to The World of HTML5

    HTML5 is just an extension of HTML. It is not a new language to develop a web

    page, It is based on the old HTML language only with some more

    features.

    It supports features like graphics, multimedia, some new markups and API'S.

    HTML5 - Wrong Notions


    HTML5 - Introduction

    Example For new Semantic Elements in HTML5:

    HTML 5 SEMANTICS and HTML5 FORMS

    55

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    56/98

    HTML5 - Graphics Support

    HTML5 - Multimedia

    HTML5 - Semantics

    Copyright Reserved.

    - Developed By Monika Jain.

    Output:

    HTML 5 SEMANTICS and HTML5 FORMS

    56

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    57/98

    In HTML5 3 new Form elements are dened. They are:

    : The datalist element is used to dene a predened list of option for a specic input. The datalist element

    is hooked up to an input element using the list attribute on the input element.

    HTML5 New Form Elements

    Countries :

    India Australia

    Pakistan

    China

    SriLanka

    demo.php:

    You Selected

    HTML5 Form Semantics: New Form Elements

    Example For :

    datalist.php:

    HTML 5 SEMANTICS and HTML5 FORMS

    57

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    58/98

    : It represents a key pair generator control. It generates two keys when the form is submitted: public key

    and private key. It is used for secure transactions.

    : It is used to represent the output of a certain mathematical calculation. It uses javascript for it.


    -


    =

    Output:

    On Selecting China and Submitting the Form:

    Example for

    HTML 5 SEMANTICS and HTML5 FORMS

    58

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    59/98

    HTML5 allows new input types for forms. These input types add features for better control and validation.

    The new input types are:

    color If a browser supports this input type, the intention is that clicking in the texteld will result in a color chooser

    popping up

    Syntax:

    Attributes :

    Value: It denes the initial value. This color will be shown in the texteld and also when the color chooser opens

    it selects that color only by default.

    Output:

    HTML5 Form Semantics: New Input types

    HTML 5 SEMANTICS and HTML5 FORMS

    59

    Supported in Browsers: CHROME and OPERA.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    60/98

    Input Element Color

    Enter a Color:

    Output:

    Example For

    HTML 5 SEMANTICS and HTML5 FORMS

    60

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    61/98

    On Clicking the Red Color Text eld a Color Browser pops up with red

    color selected as default selection:

    HTML 5 SEMANTICS and HTML5 FORMS

    61

    date This works the same as the datepicker. When you click the texteld a calendar is displayed and allows you to

    select a date from it.Syntax:

    Attributes :

    Value: The initial value that is by default displayed in the text eld.

    Step: The step size in days. By default it is 1.

    Min , Max : The minimum and maximum date that can be selected.

    Supported in Browsers: CHROME, SAFARI and OPERA.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    62/98

    Input element date

    Enter a Date:

    Example for :

    Output:

    HTML 5 SEMANTICS and HTML5 FORMS

    62

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    63/98

    On Double Clicking on 16th date the value is displayed as follows

    in the text eld:

    HTML 5 SEMANTICS and HTML5 FORMS

    63

    datetime: This element allows the user to select date and time.

    Syntax:

    Attributes :

    Value= Sets the initial value.

    Supported in Browsers: SAFARI and OPERA.

    email This element allows you to enter a valid email address.

    Syntax: Attributes :

    Value: It is used to dene an initial value.

    List: Denes the id of datalist to be displayed.

    Supported in Browsers: IE, FIREFOX, CHROME and OPERA.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    64/98

    Input element email

    Enter an Email Address:

    Example for

    email.html

    inputdemo.php

    Output:

    On entering a Wrong Email Address and hitting Submit the output is as follows:

    HTML 5 SEMANTICS and HTML5 FORMS

    64

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    65/98

    Input Element month

    Example for :

    On entering a correct Email Address:

    HTML 5 SEMANTICS and HTML5 FORMS

    65

    month This element allows the user to select a month and year.

    Syntax:

    Attributes :

    Value: It denes the initial value.

    Supported in Browsers: CHROME, SAFARI and OPERA.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    66/98

    Output:

    Now in this rst you have to select the month or year eld and then click the up ordown arrow: For month:

    HTML 5 SEMANTICS and HTML5 FORMS

    66

    number This element lets you select a number. It is also known as spinner.

    Syntax:

    Attributes :

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    67/98

    Input Element number

    Enter a Number:

    Output:

    Example for

    HTML 5 SEMANTICS and HTML5 FORMS

    67

    range This element allows the user to select a value between the given range.

    Syntax:

    Attributes :

    Value: It denes the initial value. Also it is always halfway between the min and max.

    Step: It change in the number on moving the slider is known as step. It is by default 1.

    min, max Denes the minimum and maximum value of the range.

    Supported in Browsers: IE, CHROME, SAFARI and OPERA.

    Value: It denes the initial value. If this eld is not set the eld is dened blank.

    Step: It denes the step size. The dierence in the selected number is number displayed after clicking up and

    down arrow is called step. By default it is 1.

    min and max: The minimum and maximum value that can be selected on clicking the up and down arrows.

    Supported in Browsers: CHROME, SAFARI and OPERA.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    68/98

    Input Element range

    Enter a Number in the Range (0 to 10):

    Output:

    Example for :

    range.html:

    inputdemo1.php:

    HTML 5 SEMANTICS and HTML5 FORMS

    68

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://www.facebook.com/TrueVisionTechhttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    69/98

    Input Element search

    Search Google:

    Example for

    On hitting Submit:

    HTML 5 SEMANTICS and HTML5 FORMS

    69

    search This element allows you to enter a string that can be used to search anything in the database.

    Syntax:

    Attributes :

    Value: Sets the initial value.

    Supported in Browsers: CHROME and SAFARI.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    70/98

    Input Element time

    Enter A Particular Time:

    Output:

    Example for

    I m sorry friends I wont be able to give an example for

  • 7/27/2019 HTML5 Step by Step - Ebook

    71/98

    Output:

    Example for

    Now on selecting a particular value:

    url.html

    HTML 5 SEMANTICS and HTML5 FORMS

    71

    url This element allows the user to enter a valid url address.

    Syntax:

    Attributes :

    Value: Sets the initial value.

    Supported in IE, CHROME, FIREFOX and OPERA.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    72/98

    Input Element url

    Enter A Particular url:

    Output:

    inputdemo2.php

    On entering a Wrong URL and hitting Submit the output is as follows:

    HTML 5 SEMANTICS and HTML5 FORMS

    72

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    73/98

    On entering a Wrong URL and hitting Submit the output is as follows:

    Now on hitting Submit:

    HTML 5 SEMANTICS and HTML5 FORMS

    73

    week This element allows the user to select a week and a year.

    Syntax:

    Attributes :

    Value: Sets the initial value.

    Supported in CHROME, SAFARI and OPERA.

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    74/98

    HTML5 has dened many new attributes for tag and tag.

    The attributes dened for tag are:

    autocomplete: When the autocomplete attribute is on the value of entered by the user will be automatically com-

    pleted by the values entered by the user before. If it is o the user will have to enter the whole value.

    Input Element week

    Enter A Particular Week:

    Output:

    HTML5 Form Semantics: New Form Attributes

    Example for

    HTML 5 SEMANTICS and HTML5 FORMS

    74

    Syntax: /

    autocomplete only works with input type text, search, url, tel, email, password, datepickers, range, and color.

    Supported in Browsers: IE, FireFox, Chrome and Safari

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    75/98

    Form Attribute autocomplete

    Enter Your Name:

    Example for attribute autocomplete:

    Output:

    autocomplete.html

    attributedemo.php

    Fill the Form: autocomplete =on

    HTML 5 SEMANTICS and HTML5 FORMS

    75

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    76/98

    On hitting Submit:

    Now on reloading and entering character s

    Now on setting autocomplete=o: Its not showing the value I entered before.

    HTML 5 SEMANTICS and HTML5 FORMS

    76

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    77/98

    Form Attribute novalidate

    Enter a wrong Email Id:

    Enter a worng URL:

    Example for Attribute novalidate:novalidate.html

    attributedemo1.php

    HTML 5 SEMANTICS and HTML5 FORMS

    77

    novalidate: If you specify this attribute the data entered in the form will not be validated and submitted directly.

    Syntax:

    Supported in Browsers: FireFox, Chrome and Opera

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    78/98

    Output:

    Fill the Form:

    On hitting submit in actual the validation alert is displayed as we saw before in input elements

    but here the form gets submitted and the output is displayed as follows: This is all because

    of the novalidate attribute. It doesnt allow the element to perform validation.

    HTML 5 SEMANTICS and HTML5 FORMS

    78

    The attributes dened for the tag are:

    autofocus: When you use autofocus for any input tag in the form and load the form that input will be in focus by

    default.

    Syntax -

    Supported by all the Browsers.

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    79/98

    Input Attribute autofocus

    Enter Your First Name:

    Enter Your Last Name:

    Enter Your Email ID:

    Output:

    Example for Attribute autofocus:

    As you see we have set Email id on autofocus and when we loaded the page email id is in

    focus by default.

    HTML 5 SEMANTICS and HTML5 FORMS

    79

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    80/98

    Input Attribute autofocus

    Enter Your First Name:

    Enter Your Last Name:

    Enter Your Email ID:

    Example for Attribute form:form.html:

    attributedemo2.php:

    HTML 5 SEMANTICS and HTML5 FORMS

    80

    form: This attribute is used when you want to dene an input tag associated with a form outside the form tag.

    You have to provide an id to the form tag for this so that we can uniquely associate an input tag to that form.

    Syntax:

    Supported in Browsers: FireFox , Chrome, Safari and Opera.

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    81/98

  • 7/27/2019 HTML5 Step by Step - Ebook

    82/98

    Input Attribute formaction

    Enter Your First Name:

    Enter your Last Name:

    attributedemo3.php:

    Example for Attribute formaction:

    HTML 5 SEMANTICS and HTML5 FORMS

    82

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    83/98

    attributedemo4.php:

    On Clicking Submit:

    Output:

    HTML 5 SEMANTICS and HTML5 FORMS

    83

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    84/98

    Input Attribute formenctype

    Enter Your First Name:

    Enter Your Last Name:

    Now On Clicking Submit to AttibuteDemo4.php:

    formmethod.html:

    Example for Attribute formenctype:

    Example for Attribute formmethod:

    HTML 5 SEMANTICS and HTML5 FORMS

    84

    formenctype: This attribute encodes the data posted from the form to the server.

    The formenctype attribute overrides the enctype attribute of the element.

    This attributes can only be used with the input types: submit and image.

    Syntax:

    formmethod: This attribute denes the HTTP method for sending the data of the form.

    It overrides the eect of method attribute stated in the form tag.This attribute can only be used with the input types: submit and image.

    Syntax:

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    85/98

    attributedemo7.php:

    attributedemo8.php:

    HTML 5 SEMANTICS and HTML5 FORMS

    85

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    86/98

    On Clicking the Submit Button the get method specied in the form tag will be executed:

    On Clicking the Submit Using formmethod Button the formmethod will be executed.

    As Here We have specied the value post, the form will be submitted using post method.

    Output:

    HTML 5 SEMANTICS and HTML5 FORMS

    86

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    87/98

  • 7/27/2019 HTML5 Step by Step - Ebook

    88/98

    attributedemo9.php:

    On Clicking the Submit to new tab Button, the output will be displayed on a new tab:

    Output:

    HTML 5 SEMANTICS and HTML5 FORMS

    88

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    89/98

    Input Attribute height & width

    Example for Attribute height and width:

    Output:

    HTML 5 SEMANTICS and HTML5 FORMS

    89

    height and width: This attribute is used to set the height and width of the input element

    Can only be used with input type: image

    Syntax:

    List:This attribute is used to refer to the element. It species the id of the element.

    Syntax:

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    90/98

    Input Attribute min - max

    Enter a Number in the Range (0 to 10):

    Enter A Particular Time:

    Enter a Number:

    Enter a Date:

    For Example refer to the datalist element.

    Example for attribute min and max:

    HTML 5 SEMANTICS and HTML5 FORMS

    90

    min and max: These attributes are used to set the minimum and maximum value.

    Can be used with the input types: number, range, date, datetime, datetime-local, month, time and week.

    Syntax:

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    91/98

    Input Attribute multiple

    Select Images:
    Enter Email - ID (without multiple) :
    Enter email-IDs:

    use ctrl to select multiple images.

    When I clicked on the up arrow in Enter a Number eld it went only till 6 not less than that.

    And when I entered the date 2000-01-01 It displayed :

    Output:

    Example for attribute multiple:

    HTML 5 SEMANTICS and HTML5 FORMS

    91

    Multiple: This attribute allows the user to select multiple values for a single input type.

    Can only be used with input types: email, le.

    Syntax:

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    92/98

    Now on selecting 5 images, trying to enter 2 email ids in the texteld without multiple and

    entering 3 email-ids in the last texteld:

    Output:

    HTML 5 SEMANTICS and HTML5 FORMS

    92

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    93/98

    Input Attribute Pattern

    Enter an Email-ID:

    The requested format is: \b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b i.e. the fromat of email

    address.

    Example for attribute pattern:

    Output:

    HTML 5 SEMANTICS and HTML5 FORMS

    93

    pattern (regexp): This attribute species a regular expression that the element's value is checked against.

    Can only be used with input types: text, search, url, tel, email, and password.

    Syntax:

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    94/98

    Input Attribute Email-Address

    Enter an Email-ID:

    On entering an invalid value the output is:

    Example of attribute placeholder:

    HTML 5 SEMANTICS and HTML5 FORMS

    94

    Placeholder: The placeholder attribute species a short hint that describes the expected value of an input eld.

    Can be used with input types: text, search, url, tel, email, and password.

    Syntax:

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    95/98

    Input Attribute required

    Enter an Email-ID:

  • 7/27/2019 HTML5 Step by Step - Ebook

    96/98

    Input Attribute step

    Enter a Number:

    On Hitting the Submit Button without entering any value:

    Output:

    Example for attribute step:

    HTML 5 SEMANTICS and HTML5 FORMS

    96

    Step: The step attribute species the legal number intervals for an element.

    Can be used with the input types: number, range, date, datetime, datetime-local, month, time and week.

    Syntax:

    http://www.truevisiontech.com/https://plus.google.com/113695934211553001675/postshttps://twitter.com/tvtllchttps://www.facebook.com/TrueVisionTech
  • 7/27/2019 HTML5 Step by Step - Ebook

    97/98

    On clicking on the up arrow you will get a value 8 because we have set step to 2:

    Output:

    HTML 5 SEMANTICS and HTML5 FORMS

    97

    http://www.truevisiontech.com/https://www.facebook.com/TrueVisionTechhttps://twitter.com/tvtllchttps://plus.google.com/113695934211553001675/posts
  • 7/27/2019 HTML5 Step by Step - Ebook

    98/98

    Technologies

    True VisionThank You

    Download Design Tips

    http://www.truevisiontech.com/http://www.truevisiontech.com/http://www.truevisiontech.com/services/design-services/website-design.htmlhttp://www.truevisiontech.com/services/design-services/website-design.htmlhttp://www.truevisiontech.com/