SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Css Display Property
Css Display PropertyCss Display Property
Css Display Property
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
 
Html audio video
Html audio videoHtml audio video
Html audio video
 
Java Script ppt
Java Script pptJava Script ppt
Java Script ppt
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
VueJS Introduction
VueJS IntroductionVueJS Introduction
VueJS Introduction
 
Css floats
Css floatsCss floats
Css floats
 
Java script
Java scriptJava script
Java script
 
Media queries A to Z
Media queries A to ZMedia queries A to Z
Media queries A to Z
 
HTML 5 Canvas & SVG
HTML 5 Canvas & SVGHTML 5 Canvas & SVG
HTML 5 Canvas & SVG
 
Http security response headers
Http security response headers Http security response headers
Http security response headers
 
Dhtml ppt (2)
Dhtml ppt (2)Dhtml ppt (2)
Dhtml ppt (2)
 
Basic Details of HTML and CSS.pdf
Basic Details of HTML and CSS.pdfBasic Details of HTML and CSS.pdf
Basic Details of HTML and CSS.pdf
 
Dom
Dom Dom
Dom
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAP
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 JavaScript - Chapter 9 - TypeConversion and Regular Expressions  JavaScript - Chapter 9 - TypeConversion and Regular Expressions
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 
Html ppt
Html pptHtml ppt
Html ppt
 
AEM - Client Libraries
AEM - Client LibrariesAEM - Client Libraries
AEM - Client Libraries
 

Semelhante a 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
 

Semelhante a 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
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

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!

Notas do Editor

  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