1. History, Vision & Future of HTML5 1.1 What Is HTML5? Successor of HTML 4.01 and XHTML 1.1 It comes with new tags, features and APIs Below is a non exhaustive.

Slides:



Advertisements
Similar presentations
GETTING STARTED WITH HTML5
Advertisements

HTML5, OVERVIEW AND NEW FEATURES PowerPoint by Mason O’Mara.
HTML 5: Introduction Ehsan Toreini Islamic Azad University, Mashhad Branch 2012, April.
XHTML Basics.
Tutorial 6 Creating a Web Form
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
More CSS - Page layout + HTML5 new features Boriana Koleva Room: C54
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Ch3: Introduction to HTML5 part 2 Dr. Abdullah Almutairi ISC 340 Fall 2014.
HTML 5 and CSS 3, Illustrated Complete Unit K: Incorporating Video and Audio.
HTML 5. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML came in The web has changed.
CHAPTER 30 THE HTML 5 FORMS PROCESSING. LEARNING OBJECTIVES What the three form elements are How to use the HTML 5 tag to specify a list of words’ form.
HTML Advanced: HTML 5. Welcome This slideshow presentation is designed to introduce you to HTML 5. It is the third of three HTML workshops available at.
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
  Just another way to collect pieces together (like div, section)  Anything can be in there  Formatting just like all other elements.
Audio and Video on the Web Sec 5-12 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
HTML 5 Tutorial Chapter 9 Form Attributes. New Form Attributes HTML5 has several new elements and attributes for forms. New form attributes : autocomplete.
Mark Branom, Continuing Studies.  HTML5 overview – what’s new?  New HTML5 elements  New HTML5 features  Guided Demonstrations  Forms  Video  Geolocation.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Naveen Prabhu Quadwave Consulting Pvt.Ltd.. Agenda  HTML 5 – The Standards  Browsers and HTML5 support  HTML5 Learnability  Perspectives of Web Designer,
Dr Walid M. Aly Illuminating Computer Science CCIT 4-6Sep 1.
SIG WEB January 31, 3PM. What is HTML5? What it is: Allows for better intergration of media consumption. A new open standard Provides new APIs.
Building the User Interface by Using HTML5: Organization, Input, and Validation Lesson 3.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
Neal Stublen Improvements  New form elements  Assist with validation  Consistency across sites  Changes reduce the need for common.
Lesson 4: Using HTML5 Markup.  The distinguishing characteristics of HTML5 syntax  The new HTML5 sectioning elements  Adding support for HTML5 elements.
CHAPTER 2 HTML & HTML5 II อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
HTML Advanced: HTML 5. Introduction to HTML 5 These slides are based on source material found at the w3schools.com website.
The New Elements © Main Menu Structure Media Canvas Form Click on one of the categories below to view information about the new HTML5 elements in.
HTML Forms.
  Just another way to collect pieces together (like div, section)  Anything can be in there  Formatting just like all other elements  Always name.
HTML: Hyptertext Markup Language Doman’s Sections.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
1 HTML Forms
UPLOAD / DOWNLOAD april  HTML5 is just the next iteration of HTML  Previous version was technically HTML 4.01, which incorporated XHTML 1.0.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
HTML 5 Tutorial Chapter 3 Video. Video HTML 5.0 provides a standard for showing video. Using the element we can easily embed video within our web page.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
Internet & World Wide Web How to Program, 5/e. Copyright © Pearson, Inc All Rights Reserved.2 Revised by Dr. T. Tran for CSI3140.
Web Technologies Lecture 3 Web forms. HTML5 forms A component of a webpage that has form controls – Text fields – Buttons – Checkboxes – Range controls.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
HTML Forms.
Objective: To describe the evolution of the Internet and the Web. Explain the need for web standards. Describe universal design. Identify benefits of accessible.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring Forms, HTML5 layout.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring Forms, HTML5 layout.
2.4. Choose and configure HTML5 tags to organize content and forms Choose and configure HTML5 tags for input and validation. Building the User Interface.
INTERNET APPLICATIONS CPIT405 Forms, Internal links, meta tags, search engine friendly websites.
Tutorial 6 Creating a Web Form
INT222 – Internet Fundamentals Week 8: Using New HTML features 1.
CHAPTER 8 Multimedia 1. Using Multimedia ❖ Multimedia: the combination of text, sound, and video to express an idea or convey a message. ❖ Podcasts: a.
Web Design Principles 5 th Edition Chapter 3 Writing HTML for the Modern Web.
HTML And the Internet. HTML and the Internet ► HTML: HyperText Markup Language  Language in which all pages on the web are written  Not Really a Programming.
HTML 5 Tutorial Chapter 7 Input Type. New Input Type HTML5 has several new input types for forms. These new features allow for better input control and.
Chapter 9 HTML 5 Video and Audio
Advanced HTML Tags:.
HTML CS 4640 Programming Languages for Web Applications
HTML 5.
HTML5 Basics.
HTML CS422 Dick Steflik.
PPT By:Gaurav Jaiswal Singsys Pte. Ltd.
Chapter 3 Introduction to HTML5: Part 2
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Client-Side Internet and Web Programming
HTML 5 Training HTML 5 SYMANTICS [Notes to trainer:
Creating a Basic Web Page using HTML
HTML5 - 2 Forms, Frames, Graphics.
HTML CS 4640 Programming Languages for Web Applications
Presentation transcript:

1. History, Vision & Future of HTML5 1.1 What Is HTML5? Successor of HTML 4.01 and XHTML 1.1 It comes with new tags, features and APIs Below is a non exhaustive list of features that tend to be labelled as "HTML5" in the medias: New structural elements (,, and more) Forms 2.0 and client-side validation Native browser support for audio and video (, ) Canvas API and SVG Web storage Offline applications Geolocation Drag & Drop Web Workers New communications API (Server Sent Events, Web Sockets, …)

1. History, Vision & Future of HTML5 1.2 History of HTML5? December 1997: HTML 4.0 is published by the W3C February - March 1998: XML 1.0 is published December January 2000: ECMAScript 3rd Edition, XHTML 1.0 (Basically HTML tags reformulated in XML) and, HTML 4.01 recommendations are published May 2001: XHTML 1.1 recommendation is published August 2002: XHTML 2.0 first working draft is released. December 2002: XHTML 2.0 second working draft published. January 2008: First W3C working draft of HTML5 is published!!

1. History, Vision & Future of HTML5 1.3 Future of HTML5 84% of Developers Plan to Adopt Key HTML5 Features The key to understanding HTML5 is that it is not one, but a group of technologies. Within HTML5, developers have a tremendous amount of choice regarding what they use and what they don’t use The power of HTML5 being ready for prime-time can be seen in Microsoft’s choice to utilize it in Windows 8 Still on the fence with adopting HTML5 in your next project?

2. Getting started with HTML5 Wondering what it takes to get it started? Any Text editor such as Notepad++, Editplus, Textmate, Dream weaver Modern browsers such as Firefox 3.5 +, IE9, chrome, safari Prior knowledge of HTML 4

3. Structure of Web page 3.1. New and Updated HTML5 Elements HTML5 introduces 28 new elements:,,,,,,,,,,,,,,,,,,,,,,,,,, and An HTML page first starts with the DOCTYPE declaration HTML5 also update some of the previous existing elements to better reflect how they are used on the Web or to make them more useful such as: The element can now also contain flow content instead of just phrasing content The element is now representing a paragraph-level thematic break The element only represent the title of a work The element is now representing importance rather than strong emphasis

3. Structure of Web page 3.2. First HTML5 webpage Title of the document That’s all I need to create my first HTML5 page Output: Click hereClick here

3. Structure of Web page 3.3. New Semantic Elements : Represents a major navigation block. It groups links to other pages or to parts of the current page. does not have to be used in every place you can find links. For instance, footers often contains links to terms of service, copyright page and such, the element would be sufficient in that case

3. Structure of Web page 3.3. New Semantic Elements : tag specifies a header for a document or section. However, we mustn't think that "header" is only for masthead of a website. "header" can be use as a heading of an blog entry or news article as every article has its title and published date and time

3. Structure of Web page 3.3. New Semantic Elements : The web today contains a ocean of news articles and blog entries. That gives W3C a good reason to define an element for article instead of. We should use article for content that we think it can be distributable. Just like news or blog entry can we can share in RSS feed "article" element can be nested in another "article" element. An article element doesn't just mean article content. You can have header andfooter element in an article. In fact, it is very common to have header as each article should have a title.headerfooterheader

3. Structure of Web page 3.3. New Semantic Elements : The "aside" element is a section that somehow related to main content, but it can be separate from that content

3. Structure of Web page 3.3. New Semantic Elements : Similarly to "header" element, "footer" element is often referred to the footer of a web page. Well, most of the time, footer can be used as what we thought. Please don't think you can only have one footer per web document, you can have a footer in every section, or every article.

3. Structure of Web page 3.3. New Semantic Elements : The new "progress" element appears to be very similar to the "meter" element. It is created to indicate progress of a specific task.meter The progress can be either determinate OR interderminate. Which means, you can use "progress" element to indicate a progress that you do not even know how much more work is to be done yet. Progress of Task A : 60%

3. Structure of Web page 3.3. New Semantic Elements : "Meter" is a new element in HTML5 which represenet value of a known range as a gauge. The keyword here is "known range". That means, you are only allowed to use it when you are clearly aware of its minimum value and maximum value. One example is score of rating. I would rate this movie 8 of 10.

3. Structure of Web page 3.3. New Semantic Elements : The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. Basically, it is used to bring the reader's attention to a part of the text that might not have been

3. Structure of Web page 3.3. New Semantic Elements : The tag specifies self-contained content, like illustrations, diagrams, photos, code listings, etc. While the content of the element is related to the main flow, its position is independent of the main flow, and if removed it should not affect the flow of the document

3. Structure of Web page 3.3. Lets put altogether

3. Structure of Web page 3.3. Designing blog with html5 IE layout There’s one gotcha about styling HTML 5 pages in IE: it doesn’t work. You can force it to quite easily with a JavaScript hack document.createElement('element name'). HTML 5 enabling scriptHTML 5 enabling script which I use in the header to conjure all the missing elements into existence all at once.

3. Structure of Web page 3.3. why so much fuss for semantics in html5 Well, they add semantics to the page. The browser now knows which area of your site is the header or the footer because there are header and footer elements, whereas div might be called “branding The first is for search engine use; it’s easy to imagine Messrs Google or Yahoo! giving lower weighting to content in footer elements, or extra weight to content in the header. site navigable for people with disabilities. People with learning difficulties might instruct their browser always to put the articles before the navigation

Form Attributs

HTML5 has several new elements and attributes for forms. New form attributes : autocomplete novalidate New input attributes : autocomplete autofocus form form overrides (formaction, formenctype, formmethod, formnovalidate, formtarget) height and width list min, max and step multiple pattern (regexp) placeholder required New Form Attributes

Browser support for the new input type : Browser Support Input TypeIEFirefoxOperaChromeSafari autocomplete autofocusNo formNo No form overridesNo No height and width listNo4.09.5No min, max and stepNo No multipleNo novalidateNo No patternNo No placeholderNo requiredNo No

The autocomplete attribute specifies that the form or input field should have an autocomplete function. Note: The autocomplete attribute works with, and the following types: text, search, url, telephone, , password, datepickers, range, and color. When the user starts to type in an autocomplete field, the browser should display options to fill in the field : First name: Last name: In some browsers you may need to activate the autocomplete function for this to work. autocomplete Attribute

The autofocus attribute specifies that a field should automatically get focus when a page is loaded. Note: The autofocus attribute works with all types. User name: autofocus Attribute

The form attribute specifies one or more forms the input field belongs to. Note: The form attribute works with all types. To refer to more than one form, use a space-separated list. The form attribute must refer to the id of the form it belongs to: First name: Last name: form Attribute

The form override attributes allow you to override some of the attributes set for the form element. The form override attributes are : formaction - Overrides the form action attribute formenctype - Overrides the form enctype attribute formmethod - Overrides the form method attribute formnovalidate - Overrides the form novalidate attribute formtarget - Overrides the form target attribute Note: The form override attributes works with the following types: submit and image. Form Override Attribute

Example : These attributes are helpful for creating different submit buttons. Form Override Attribute

The height and width attributes specifies the height and width of the image used for the input type image. The height and width attributes only works with type: image. height and width Attribute

The list attribute specifies a datalist for an input field. A datalist is a list of options for an input field. The list attribute works with the following types : text, search, url, telephone, , date pickers, number, range, and color. Webpage: list Attribute

The min, max and step attributes are used to specify restrictions for input types containing numbers or dates. The max attribute specifies the maximum value allowed for the input field. The min attribute specifies the minimum value allowed for the input field. The step attribute specifies the legal number intervals for the input field (if step="3", legal numbers could be - 3,0,3,6, etc). min, max and step Attribute

The min, max, and step attributes works with the following types: date pickers, number, and range. The example below shows a numeric field that accepts values between 0 and 10, with a step of 3 (legal numbers are 0, 3, 6 and 9): Points: min, max and step Attribute

The multiple attribute specifies that multiple values can be selected for an input field. The multiple attribute works with the following types: , and file. Example : Select images: multipleAttribute multiple Attribute

The novalidate attribute specifies that the form or input field should not be validated when submitted. If this attribute is present the form will not validate form input. The novalidate attribute works with: and the following types: text, search, url, telephone, , password, date pickers, range, and color. Example : novalidate Attribute

The pattern attribute specifies a pattern used to validate an input field. The pattern is a regular expression. The pattern attribute works with the following types: text, search, url, telephone, , and password The example below shows a text field that can only contain three letters (no numbers or special characters) : Country code: pattern Attribute

The placeholder attribute provides a hint that describes the expected value of an input field. The placeholder attribute works with the following types: text, search, url, telephone, , and password The hint is displayed in the input field when it is empty, and disappears when the field gets focus. Example : placeholderAttribute placeholder Attribute

The required attribute specifies that an input field must be filled out before submitting. The required attribute works with the following types: text, search, url, telephone, , password, date pickers, number, checkbox, radio, and file. Example : Name: required Attribute

Input Type

HTML5 has several new input types for forms. These new features allow for better input control and validation. New input types : url number range Date pickers (date, month, week, time, datetime, datetime-local) search color New Input Type

Browser support for the new input type : Browser Support Input TypeIEFirefoxOperaChromeSafari No No urlNo No numberNo No rangeNo Date pickersNo No searchNo No colorNo 11.0No

The type is used for input fields that should contain an address. The value of the field is automatically validated when the form is submitted. Basic syntax : Input Type -

The url type is used for input fields that should contain a URL address. The value of the url field is automatically validated when the form is submitted. Basic syntax : Homepage: Input Type - url

The number type is used for input fields that should contain a numeric value. You can also set restrictions on what numbers are accepted Example : Points: Input Type - number

Use the following attributes to specify restrictions for the number type: Input Type - number AttributeValueDescription maxnumberSpecifies the maximum value allowed minnumberSpecifies the minimum value allowed stepnumber Specifies legal number intervals (if step="3", legal numbers could be -3,0,3,6, etc) valuenumberSpecifies the default value

The range type is used for input fields that should contain a value from a range of numbers. The range type is displayed as a slider bar. You can also set restrictions on what numbers are accepted Example: Input Type - range

Use the following attributes to specify restrictions for the range type: Input Type - range AttributeValueDescription maxnumberSpecifies the maximum value allowed minnumberSpecifies the minimum value allowed stepnumber Specifies legal number intervals (if step="3", legal numbers could be -3,0,3,6, etc) valuenumberSpecifies the default value

HTML5 has several new input types for selecting date and time: date - Selects date, month and year month - Selects month and year week - Selects week and year time - Selects time (hour and minute) datetime - Selects time, date, month and year (UTC time) datetime-local - Selects time, date, month and year (local time) Example: Date: Input Type – Date Pickers

The search type is used for search fields, like a site search, or Google search. The search field behaves like a regular text field. Input Type – search

The color type is used for input fields that should contain a color. This input type will allow you to select a color from a color picker : Color: Input Type – color

Audio

The HTML 5.0 specification allows us playing sound using the element. The element can play sound files or an audio stream. The HTML 5.0 specification aims at supporting the following sounds formats: MP3, WAV and Ogg Vorbis. Audio

Until now, there has never been a standard for playing audio on a web page. Today, most audio are played through a plugin (like flash). However, not all browsers have the same plugins. Currently, there are 3 supported audio formats for the audio element: Format FormatFirefox 3.5Opera 10.5Chrome 3.0IE 9Safari 3.0 Ogg VorbisYes No MP3No Yes WavYes No Yes

Basic Syntax to Embed Video : *Content we place in between the tags will be displayed when the browser doesn't support playing audio The control attribute is for adding the play, pause and volume controls Basic Syntax

The audio element allows multiple source elements. Source elements can link to different audio files. We can add the child elements in between the audio element tags. The browser will use the first supported format. browser does not support html 5.0 Basic Syntax

The HTML 5.0 supports the following attributes : Attribute AttributeValueDescription autoplay Specifies that the audio will start playing as soon as it is ready. controls Specifies that controls will be displayed, such as a play button. loop Specifies that the audio will start playing again (looping) when it reaches the end preload Specifies that the audio will be loaded at page load, and ready to run. Ignored if autoplay is present. srcurl Specifies the URL of the audio to play

Video

HTML 5.0 provides a standard for showing video. Using the element we can easily embed video within our web page. The video formats the element supports include the following : MPG4 (with H.264 video codec and AAC audio codec) OGG (with Thedora video codec and Vorbis audio codec) Video

Until now, there has never been a standard for showing video on a web page. Today, most videos are shown through a plugin (like flash). However, not all browsers have the same plugins. HTML5 specifies a standard way to include video, with the video element. Currently, there are 2 supported video formats for the video element: Format FormatFirefox 3.5Opera 10.5Chrome 3.0IE 8Safari 3.0 OggYes No MPEG 4No YesNoYes

Basic Syntax to Embed Video : *Content we place in between the tags will be displayed when the browser doesn't support displaying video We can use the width and height attributes in order to specify the size The control attribute is for adding the play, pause and volume controls Basic Syntax

Example : HTML 5 Playing Video Sample <video src=" controls="controls" width=“600" height=“280"> Browser does not support HTML 5.0 Basic Syntax

The video element allows multiple source elements. Source elements can link to different video files. The browser will use the first recognized format : Your browser does not support the video tag. Basic Syntax

The HTML 5.0 supports the following attributes : Attribute AttributeValueDescription audiomuted Defining the default state of the the audio. Currently, only "muted" is allowed autoplay If present, then the video will start playing as soon as it is ready controls If present, controls will be displayed, such as a play button heightpixels Sets the height of the video player loop If present, the video will start over again, every time it is finished posterurl Specifies the URL of an image representing the video preload If present, the video will be loaded at page load, and ready to run. Ignored if "autoplay" is present srcurl The URL of the video to play widthpixels Sets the width of the video player