SlideShare a Scribd company logo
1 of 85
2022 HTML5: The
  future is now
 Gonzalo Cordero F2E Summit 2011
Looking back

• The front-end has lacked major updates for
  over a decade

     CSS 2         HTML 4.01      ECMASCript 3
     (1998)          (1999)          (1999)
Looking back...


We’ve been working on 10 years old Technology
Got Milk?

       You wouldn’t drink a 9
     years old milk would you?
HTML5 To Save the day
So what’s HTML5?


HTML5~=Buzz + HTML5 Tags + CSS3 + New JS Apis
can I haz HTML5?
The W3C and WHATWG are currently working on the
                 specs
can I haz HTML5?


...And then there is this whole thing about 2022...
in the year 2022...
We will have floating skateboards...
       (And awesome looking nike shoes)
In the year 2022...
Skynet will be ruling the world...or not.
besides...
and...
and...
The HTML5 spec will be ready...
and...
The HTML5 spec will be ready...
ishtml5readyyet.com
Plus Crockford says we gotta start from scratch...
can I haz html5?
So just when you thought your problems were going away...
can I haz HTML5?
Browser vendors still deciding what and how
Welcome to the life of a Front End engineer
This concludes this presentation....
Go see a therapist and come back in 10 years...
Ok, It’s really not that
          bad...

         I promise
The future is now
The future is now
The future is now
The future is now
The future is now
HTML5

• Is here to stay.
• You can start using it today.
• No need to throw away your previous
  code.
So what’s new?


• Page level changes
• New HTML Elements
Doctype: Before


<!DOCTYPE HTML PUBLIC "-//W3C//DTD
             HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd">
Doctype: now


 <!DOCTYPE html>
Meta: Before

<meta http-equiv="Content-Type" content="text/
             html; charset=utf-8">
Meta: Now


<meta charset="utf-8">
Types No-More
        Assumes text/css

<link rel="stylesheet" href="main.css">

    Assumes text/javascript

           <script>....</script>
<link> & <a> relations
• Examples:
  <a rel="archives" href="http://myblog.com/archives">old posts</a>

  <link rel="alternate" type="application/rss+xml" href="http://myblog.com/feed">

  <a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">license</a>
  <a rel="nofollow" href="http://notmysite.com/sample">wannabe</a>
<link> & <a> relations

• Other values:
  alternate, author, bookmark, first, help, icon,
  index, last, next, noreferrer, pingback,
  prefetch, prev, search...
HTML5 Elements
• HTML5 provides new structural block-level
  elements:
 -   Header
 -   Nav
 -   Section
 -   Footer
 -   Article
     Aside
HTML5 Elements
• HTML5 provides new structural block-level
  elements:
 -   Header             <header>



 -   Nav                <nav>      <sec$on>




 -
                                   <ar$cle>     <aside>

     Section
                                   <ar$cle
>


 -   Footer                         <ar$cle
>



 -   Article            <footer>



     Aside
The Semantic of
        semantics

• Better organized, easier to maintain.
• Screen readers.
• Open to future applications: Advanced rss
  readers, widgets, etc.
Header blocks : before


    <div id="header">...</div>
Headers blocks: Now


    <header>...</header>
Headers
• ...represents a group of introductory or
  navigational aids.
• can have multiple header elements on a page
• it is defined by its content, not its position
• Should not exist within another <header> or
  within <footer>
Header
Header
            <header>



<header>
Headers: Example
 <div id="header">
   <h1>BMW USA</h1>
   <h2 class="tagline">The Ultimate Driving Machine</h2>
 </div>




<header>
   <h1>BMW USA</h1>
   <h2 class="tagline">The Ultimate Driving 
 Machine</h2>
</header>
hgroups
• Related headings (h1-h6) may be grouped
   together (wrapped) and treated as a single
   structure in the document outline


<header>
   <hgroup>
      <h1>BMW USA</h1>
      <h2 class="tagline">The Ultimate Driving ßMachine</h2>
   </hgroup>
</header>
Nav : Before
<div id="nav">
  <ul>
      <li><a href="#">home</a></li>
      <li><a href="#">blog</a></li>
      <li><a href="#">gallery</a></li>
      <li><a href="#">about</a></li>
  </ul>
</div>
Nav : after
<nav>
  <ul>
     <li><a href="#">home</a></li>
     <li><a href="#">blog</a></li>
     <li><a href="#">gallery</a></li>
     <li><a href="#">about</a></li>
  </ul>
</nav>
Nav
Nav
        <nav>




<nav>
Nav

• ...represents a section of a page that links
  to other pages or to parts within the page
• only sections that consist of major
  navigation blocks are appropriate for the
  <nav> element
Sections

• "...represents a generic section of a
  document or application. ...is a thematic
  grouping of content, typically with a
  heading."
• It allows to reset the document outline
Sections
<article>
 <hgroup>
   <h1>My Title</h1>
   <h2>My Subtitle</h2>
 </hgroup>
 <section>
   <h1>Section Title</h1>
   <p>Article content</p>
    <section>
      <h1>Sub-content title</h1>
      <p>Article sub-content</p>
    </section>
 </section>
</article>
Sections: Rule of thumb

• Don't use it just as hook for styling or
  scripting; that's a <div>
• Don't use it if <article>, <aside> or <nav>
  is more appropriate
• Don't use it unless there is naturally a
  heading at the start of the section
Articles: before
<div class="entry">
 <h2>
    <a href="something.html"
      rel="bookmark"
      title="link to this post">
     Travel day
    </a>
    <p class="post-date">October 22, 2009</p>
 </h2>
 ...
</div>
Articles: now
<article>
 <header>
    <h1>
     <a href="#"
       rel="bookmark"
       title="link to this post">
       Travel day
     </a>
    </h1>
    <p class="post-date">October 22, 2009</p>
 </header>
 ...
</article>
Articles
• used for 'self-contained related content'
• useful for blog posts, news stories,
  comments, reviews, forum posts
• can also be used for widget types of
  content, e.g. stock ticker
• can be nested, as well as <section>
Aside
• <aside> is another specialized form of
  section
• Provides tangentially related content
• May be used for
   • advertisements
   • pull quotes or sidebar content
Aside
<article>
  <div class="article">
    <h1>Blog 2</h1>
    <p>I discovered a new planet
while...</p>
    <aside>
       <p>The number of potential planets
         that can support life are...</p>
    </aside>
  </div>
</article>
Aside: example


   <aside>
Footer: before


<div id="footer">...</div>
Footer: now


<footer>...</footer>
Footer

• Indicate concluding content in a section
• May be used to contain copyright info,
  author info, links to additional references,
  etc.
Footer
Footer




<footer>
Other Notable
         Elements
• <figure>, <figcaption>
• <mark>
• <time>, <meter>
• <details> & <summary>
• <b>, <i>, <small> revisited
• Custom attributes
• Global attributes
HTML5 Forms: now

• New input types
• Use of required fields, placeholders, and
  autofocus
• Validation capabilities
• Form elements outside of the <form> tag
PlaceHolders
<input type="email"
  placeholder="Enter your email">
</input>
Autofocus
   • Sets an element to be the default starting
      element in the form (can only be used once
      in the form)


<input type="text" name="yahoo-search" autofocus>
Required fields

<input type="password" name="password" required>
New input types
• tel                                     • search
• number                                  • range
• url                                     • color
• email                                   • date(month,
                                                week...)`

    For
the
input
types
that
perform
valida4on,
visual

    feedback
should
be
provided
as
to
the
validity
of
the

    data
by
using
the
:valid
and
:invalid
CSS
pseudo‐classes
HTML5 Forms-
        validation
• Opera and FF4 offer form validations.
Media: Audio&Video

• A <source> must be specified in a format
  supported by that browser
• Video formats:
• Audio: Browsers support WAV, MP3, Ogg
  Vorbis
Media: Audio&Video
<video id="movie" width="320" height="240" controls>
  <source src="pr6.mp4">
  <source ...>
</video>

<audio controls>
  <source src="intro.mp3">
</audio>
Graphics: Canvas&SVG
Canvas
• It gives you a "drawing" surface
• You manipulate it via JS
• Accessibility is an challenge.
  <canvas id="myCanvas" width="300" height="150">
    Default fallback text
  </canvas>

  var mycanvas =
  document.getElementById("myCanvas").getContext("
  2d");

  //draws a rectangle filled with the current fill style
  mycanvas.fillrect(x, y, width, height);
SVG

• XML-based vector graphics format
• You can also style SVG with CSS and add
  dynamic behavior to it using the SVG DOM
• relatively accessible.
SVG: Example

<svg version="1.1"
 width="320" height="320"
 xmlns="http://www.w3.org/2000/svg">

 <ellipse fill="url(#circleGrad)" stroke="#000" cx="50%" cy="50%" rx="50%" ry="50%">
   <animate attributename="rx" values="0%;50%;0%" dur="2s" repeatcount="indefinite">
   <animate attributename="ry" values="0%;50%;0%" dur="2s" repeatcount="indefinite">
 </animate>
</svg>
Playing nice with the
         elders

• Different workarounds have emerged
      • Shivs(Javascript DOM injection)
      • Wrapping with HTML4 Elements
Pre-HTML5
<style>
    article,aside,details,figcaption,figure,footer,
    header,hgroup,menu,nav,section {
     display: block;
  }
</style>
HTML4 Wrapping
<section>
  <div class="section">
    <!-- content -->
  </div>
</section>
Pre-html5


• Don’t rely on html5 elements for styling or
  DOM manipulation
• Avoid using css child selector rules.
Conclusion

• HTML5 is here to stay
• Use it today. Don’t be afraid.
• Get excited and blog about it!
Q&A


twitter.com/goonieiam

More Related Content

What's hot

Hadoop cluster configuration
Hadoop cluster configurationHadoop cluster configuration
Hadoop cluster configuration
prabakaranbrick
 

What's hot (20)

Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
Alfresco tuning part1
Alfresco tuning part1Alfresco tuning part1
Alfresco tuning part1
 
Solr Presentation
Solr PresentationSolr Presentation
Solr Presentation
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL databaseHBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
 
Javascript by geetanjali
Javascript by geetanjaliJavascript by geetanjali
Javascript by geetanjali
 
Rest web services
Rest web servicesRest web services
Rest web services
 
Apache web server
Apache web serverApache web server
Apache web server
 
Hadoop cluster configuration
Hadoop cluster configurationHadoop cluster configuration
Hadoop cluster configuration
 
Node js overview
Node js overviewNode js overview
Node js overview
 
Bootstrap 5 whats new
Bootstrap 5   whats newBootstrap 5   whats new
Bootstrap 5 whats new
 
Laravel Tutorial PPT
Laravel Tutorial PPTLaravel Tutorial PPT
Laravel Tutorial PPT
 
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesXXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearch
 
Intro to html 5
Intro to html 5Intro to html 5
Intro to html 5
 
(BDT404) Large-Scale ETL Data Flows w/AWS Data Pipeline & Dataduct
(BDT404) Large-Scale ETL Data Flows w/AWS Data Pipeline & Dataduct(BDT404) Large-Scale ETL Data Flows w/AWS Data Pipeline & Dataduct
(BDT404) Large-Scale ETL Data Flows w/AWS Data Pipeline & Dataduct
 
CSRF-уязвимости все еще актуальны: как атакующие обходят CSRF-защиту в вашем ...
CSRF-уязвимости все еще актуальны: как атакующие обходят CSRF-защиту в вашем ...CSRF-уязвимости все еще актуальны: как атакующие обходят CSRF-защиту в вашем ...
CSRF-уязвимости все еще актуальны: как атакующие обходят CSRF-защиту в вашем ...
 

Similar to 2022 HTML5: The future is now

Darwin web standards
Darwin web standardsDarwin web standards
Darwin web standards
Justin Avery
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
Terry Ryan
 

Similar to 2022 HTML5: The future is now (20)

HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
 
Html5 public
Html5 publicHtml5 public
Html5 public
 
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
 
Html5
Html5Html5
Html5
 
Web development basics (Part-1)
Web development basics (Part-1)Web development basics (Part-1)
Web development basics (Part-1)
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bag
 
HTML 5 Fundamental
HTML 5 FundamentalHTML 5 Fundamental
HTML 5 Fundamental
 
Css
CssCss
Css
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
 
html5_css3
html5_css3html5_css3
html5_css3
 
Put the 5 in HTML
Put the 5 in HTMLPut the 5 in HTML
Put the 5 in HTML
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
Darwin web standards
Darwin web standardsDarwin web standards
Darwin web standards
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
HTML5 & CSS3 Flag
HTML5 & CSS3 FlagHTML5 & CSS3 Flag
HTML5 & CSS3 Flag
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

2022 HTML5: The future is now

  • 1. 2022 HTML5: The future is now Gonzalo Cordero F2E Summit 2011
  • 2. Looking back • The front-end has lacked major updates for over a decade CSS 2 HTML 4.01 ECMASCript 3 (1998) (1999) (1999)
  • 3. Looking back... We’ve been working on 10 years old Technology
  • 4. Got Milk? You wouldn’t drink a 9 years old milk would you?
  • 5. HTML5 To Save the day
  • 6. So what’s HTML5? HTML5~=Buzz + HTML5 Tags + CSS3 + New JS Apis
  • 7. can I haz HTML5? The W3C and WHATWG are currently working on the specs
  • 8. can I haz HTML5? ...And then there is this whole thing about 2022...
  • 9. in the year 2022... We will have floating skateboards... (And awesome looking nike shoes)
  • 10. In the year 2022... Skynet will be ruling the world...or not.
  • 13. and... The HTML5 spec will be ready...
  • 14. and... The HTML5 spec will be ready...
  • 16. Plus Crockford says we gotta start from scratch...
  • 17. can I haz html5? So just when you thought your problems were going away...
  • 18. can I haz HTML5? Browser vendors still deciding what and how
  • 19. Welcome to the life of a Front End engineer
  • 20. This concludes this presentation....
  • 21. Go see a therapist and come back in 10 years...
  • 22.
  • 23. Ok, It’s really not that bad... I promise
  • 29. HTML5 • Is here to stay. • You can start using it today. • No need to throw away your previous code.
  • 30. So what’s new? • Page level changes • New HTML Elements
  • 31. Doctype: Before <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  • 33. Meta: Before <meta http-equiv="Content-Type" content="text/ html; charset=utf-8">
  • 35. Types No-More Assumes text/css <link rel="stylesheet" href="main.css"> Assumes text/javascript <script>....</script>
  • 36. <link> & <a> relations • Examples: <a rel="archives" href="http://myblog.com/archives">old posts</a> <link rel="alternate" type="application/rss+xml" href="http://myblog.com/feed"> <a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">license</a> <a rel="nofollow" href="http://notmysite.com/sample">wannabe</a>
  • 37. <link> & <a> relations • Other values: alternate, author, bookmark, first, help, icon, index, last, next, noreferrer, pingback, prefetch, prev, search...
  • 38. HTML5 Elements • HTML5 provides new structural block-level elements: - Header - Nav - Section - Footer - Article Aside
  • 39. HTML5 Elements • HTML5 provides new structural block-level elements: - Header <header> - Nav <nav> <sec$on> - <ar$cle> <aside> Section <ar$cle
> - Footer <ar$cle
> - Article <footer> Aside
  • 40. The Semantic of semantics • Better organized, easier to maintain. • Screen readers. • Open to future applications: Advanced rss readers, widgets, etc.
  • 41. Header blocks : before <div id="header">...</div>
  • 42. Headers blocks: Now <header>...</header>
  • 43. Headers • ...represents a group of introductory or navigational aids. • can have multiple header elements on a page • it is defined by its content, not its position • Should not exist within another <header> or within <footer>
  • 45. Header <header> <header>
  • 46. Headers: Example <div id="header"> <h1>BMW USA</h1> <h2 class="tagline">The Ultimate Driving Machine</h2> </div> <header> <h1>BMW USA</h1> <h2 class="tagline">The Ultimate Driving Machine</h2> </header>
  • 47. hgroups • Related headings (h1-h6) may be grouped together (wrapped) and treated as a single structure in the document outline <header> <hgroup> <h1>BMW USA</h1> <h2 class="tagline">The Ultimate Driving ßMachine</h2> </hgroup> </header>
  • 48. Nav : Before <div id="nav"> <ul> <li><a href="#">home</a></li> <li><a href="#">blog</a></li> <li><a href="#">gallery</a></li> <li><a href="#">about</a></li> </ul> </div>
  • 49. Nav : after <nav> <ul> <li><a href="#">home</a></li> <li><a href="#">blog</a></li> <li><a href="#">gallery</a></li> <li><a href="#">about</a></li> </ul> </nav>
  • 50. Nav
  • 51. Nav <nav> <nav>
  • 52. Nav • ...represents a section of a page that links to other pages or to parts within the page • only sections that consist of major navigation blocks are appropriate for the <nav> element
  • 53. Sections • "...represents a generic section of a document or application. ...is a thematic grouping of content, typically with a heading." • It allows to reset the document outline
  • 54. Sections <article> <hgroup> <h1>My Title</h1> <h2>My Subtitle</h2> </hgroup> <section> <h1>Section Title</h1> <p>Article content</p> <section> <h1>Sub-content title</h1> <p>Article sub-content</p> </section> </section> </article>
  • 55. Sections: Rule of thumb • Don't use it just as hook for styling or scripting; that's a <div> • Don't use it if <article>, <aside> or <nav> is more appropriate • Don't use it unless there is naturally a heading at the start of the section
  • 56. Articles: before <div class="entry"> <h2> <a href="something.html" rel="bookmark" title="link to this post"> Travel day </a> <p class="post-date">October 22, 2009</p> </h2> ... </div>
  • 57. Articles: now <article> <header> <h1> <a href="#" rel="bookmark" title="link to this post"> Travel day </a> </h1> <p class="post-date">October 22, 2009</p> </header> ... </article>
  • 58. Articles • used for 'self-contained related content' • useful for blog posts, news stories, comments, reviews, forum posts • can also be used for widget types of content, e.g. stock ticker • can be nested, as well as <section>
  • 59. Aside • <aside> is another specialized form of section • Provides tangentially related content • May be used for • advertisements • pull quotes or sidebar content
  • 60. Aside <article> <div class="article"> <h1>Blog 2</h1> <p>I discovered a new planet while...</p> <aside> <p>The number of potential planets that can support life are...</p> </aside> </div> </article>
  • 61. Aside: example <aside>
  • 64. Footer • Indicate concluding content in a section • May be used to contain copyright info, author info, links to additional references, etc.
  • 67. Other Notable Elements • <figure>, <figcaption> • <mark> • <time>, <meter> • <details> & <summary> • <b>, <i>, <small> revisited • Custom attributes • Global attributes
  • 68. HTML5 Forms: now • New input types • Use of required fields, placeholders, and autofocus • Validation capabilities • Form elements outside of the <form> tag
  • 69. PlaceHolders <input type="email" placeholder="Enter your email"> </input>
  • 70. Autofocus • Sets an element to be the default starting element in the form (can only be used once in the form) <input type="text" name="yahoo-search" autofocus>
  • 71. Required fields <input type="password" name="password" required>
  • 72. New input types • tel • search • number • range • url • color • email • date(month, week...)` For
the
input
types
that
perform
valida4on,
visual
 feedback
should
be
provided
as
to
the
validity
of
the
 data
by
using
the
:valid
and
:invalid
CSS
pseudo‐classes
  • 73. HTML5 Forms- validation • Opera and FF4 offer form validations.
  • 74. Media: Audio&Video • A <source> must be specified in a format supported by that browser • Video formats: • Audio: Browsers support WAV, MP3, Ogg Vorbis
  • 75. Media: Audio&Video <video id="movie" width="320" height="240" controls> <source src="pr6.mp4"> <source ...> </video> <audio controls> <source src="intro.mp3"> </audio>
  • 77. Canvas • It gives you a "drawing" surface • You manipulate it via JS • Accessibility is an challenge. <canvas id="myCanvas" width="300" height="150"> Default fallback text </canvas> var mycanvas = document.getElementById("myCanvas").getContext(" 2d"); //draws a rectangle filled with the current fill style mycanvas.fillrect(x, y, width, height);
  • 78. SVG • XML-based vector graphics format • You can also style SVG with CSS and add dynamic behavior to it using the SVG DOM • relatively accessible.
  • 79. SVG: Example <svg version="1.1" width="320" height="320" xmlns="http://www.w3.org/2000/svg"> <ellipse fill="url(#circleGrad)" stroke="#000" cx="50%" cy="50%" rx="50%" ry="50%"> <animate attributename="rx" values="0%;50%;0%" dur="2s" repeatcount="indefinite"> <animate attributename="ry" values="0%;50%;0%" dur="2s" repeatcount="indefinite"> </animate> </svg>
  • 80. Playing nice with the elders • Different workarounds have emerged • Shivs(Javascript DOM injection) • Wrapping with HTML4 Elements
  • 81. Pre-HTML5 <style> article,aside,details,figcaption,figure,footer, header,hgroup,menu,nav,section { display: block; } </style>
  • 82. HTML4 Wrapping <section> <div class="section"> <!-- content --> </div> </section>
  • 83. Pre-html5 • Don’t rely on html5 elements for styling or DOM manipulation • Avoid using css child selector rules.
  • 84. Conclusion • HTML5 is here to stay • Use it today. Don’t be afraid. • Get excited and blog about it!

Editor's Notes

  1. \n
  2. HTML 4.01 has remained largely the same for over a decade. During this time, the markup has been used and misused in so many ways that it is evident a new markup is needed to support the current demands of page development.\n\nCSS 2.1 has gone from a working draft to candidate recommendation within the W3C, and back to working draft over the last six years. Nevertheless, CSS 2.1 has merely served as an update fixing minor errors within the CSS 2 specification. The major features of CSS have largely remained unchanged since 1998.\n\nECMAScript underwent 3 revisions from 1997 until 1999. After that, little occurred in the specification. Other features, such as the XMLHttpRequest, have appeared since, but these are a result of widespread adoption by numerous browser vendors and not as a result of updates to any specifications. Disagreements as to how ECMAScript 4 should look led to the formation of ECMAScript Harmony and the now abandoned ECMAScript 4. ECMAScript 5 was released in December of 2009. It is beginning to pick up support within the current generation of browsers.\n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. - This triggers standards mode even in ie6\n
  31. \n
  32. - Use only when server is unable to set the charset via headers.\n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. Because a &lt;header&gt; should not contain a header or footer element, a complex page header might require a section instead.\n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. Pretty convenient, it replaces JS to set default text.\n
  64. \n
  65. JavaScript validation will still be necessary when form validation is needed\n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n