SlideShare a Scribd company logo
HTML5 The Missing Part
         othree
Outline

• Semantic Web
• HTML5
• Web Forms 2.0
Semantic Web


• Tim Bernes Lee
What is Semantic Web


•
So


•
TOSSUG HTML5 讀書會 新標籤與表單
How ?


• XML for data
• (X)HTML for web content
(X)HTML Standards

• HTML 4.01: Still using today
• XHTML 1: Bridge between HTML and XML
• XHTML 1.1: Preparing for Semantic Web
• XHTML 2.0 ( )
XHTML 2.0

•
•
• ex: no <h1> ~ <h6>, <br>
TOSSUG HTML5 讀書會 新標籤與表單
How ?
•
    • <table> for            not
    • <p> for
    • <h1> ~ <h6> for not
    • <blockquote> for not
    •         <b>, <i>, <u>, <big>, <small>
http://www.certifiedchinesetranslation.com/openaccess/rdfa-primer.html
2nd Step


•   RDFa, Microformats ... etc
HTML
<div>
         Bob Smith
                     Smithy

 <a href="http://www.example.com">www.example.com</a>.
        Albuquerque (NM)            ACME Corp.

</div>




                     http://www.google.com/support/webmasters/bin/topic.py?topic=21997
vCard
        BEGIN:VCARD
        VERSION:3.0
        N:Bob Smith
        FN:Bob Smith
        NICKNAME:Smithy
        URL: http://www.example.com
        TITLE:
        ORG:ACME Corp
        ADR;TYPE=work:;;;Albuquerque;NM;;
        END:VCARD




http://www.google.com/support/webmasters/bin/topic.py?topic=21997
RDFa
<div xmlns:v="http://rdf.data-vocabulary.org/#" typeof="v:Person">
      <span property="v:name">Bob Smith</span>
                 <span property="v:nickname">Smithy</span>

 <a href="http://www.example.com" rel="v:url">www.example.com</a>.
        Albuquerque (NM)               <span property="v:affiliation">ACME
Corp</span>.
      <span property="v:title">    </span>
</div>




                 http://www.google.com/support/webmasters/bin/topic.py?topic=21997
Microformats
<div class="vcard">
       <span class="fn">Bob Smith</span>
                 <span class="nickname">Smithy</span>

 <a href="http://www.example.com" class="url">www.example.com</a>.
        Albuquerque (NM)               <span class="org">ACME Corp</span>.
      <span class="title">    </span>
</div>




                http://www.google.com/support/webmasters/bin/topic.py?topic=21997
Microformats
    hCalendar
      hCard
    rel-license
   rel-nofollow
      rel-tag
      XFN
     XOXO
        ...
Benefits

•       (Accessibility)
• SEO
•
•
HTML Standards

• HTML 4.01: Still using today
• XHTML 1: Bridge between HTML and XML
• XHTML 1.1: Preparing for Semantic Web
• XHTML 2.0 ( )
• (X)HTML5 by WHATWG
HTML5 New Elements
New Structure Elements
        <header>
        <footer>
         <nav>
         <aside>
        <article>
        <hgroup>
        <section>
A Web Page
       <div id=”header”></div>

       <ul id=”navigator”></ul>




                             <div id=”sidebar”>
<div id=”content”></div>            </div>




       <div id=”footer”></div>
A Web Page in HTML5
            <header></header>

               <nav></nav>




                                <aside>
   <div id=”content”></div>     </aside>




            <footer></footer>
Structure Elements

• <header>
• <footer>
• <aside>
• <nav>
Weblog Index
<div class=”entry”></div>



<div class=”entry”></div>



<div class=”entry”></div>
Weblog Index
  <article></article>



  <article></article>



  <article></article>
<article>

•
•
•
•
• ...etc
An Article
  <h1></h1>

  <p></p>

  <h2></h2>

   <p></p>

  <h2></h2>

   <p></p>
An Article
  <h1></h1>

  <p></p>

  <section>
    <h2></h2>

     <p></p>

    <h2></h2>

     <p></p>

  </section>
<hgroup>
<hgroup>
 <h1>My Weblog</h1>
 <h2 class="tagline">A lot of effort went into making this effortless.</h2>
</hgroup>

<div class="entry">
 <h2>Travel day</h2>
</div>

<div class="entry">
 <h2>I'm going to Prague!</h2>
</div>




                             http://diveintohtml5.org/semantics.html
Outline


•   My Weblog

    •   Travel day

    •   I'm going to Prague!




                     http://diveintohtml5.org/semantics.html
Site Title and Article Title
<h1>My Weblog</h1>
<h2 class="tagline">A lot of effort went into making this effortless.</h2>

<div class="entry">
 <h2>Travel day</h2>
</div>

<div class="entry">
 <h2>I'm going to Prague!</h2>
</div>




                             http://diveintohtml5.org/semantics.html
Outline

•   My Weblog

    •   A lot of effort went into making this effortless

    •   Travel day

    •   I'm going to Prague!




                      http://diveintohtml5.org/semantics.html
Mixin

• Is <article> in <article> valid ?
• Is <article> in <section> valid ?
• How about <header> in <article> ?
Yes
<article>
 <header>
  <h1>The Very First Rule of Life</h1>
  <p><time pubdate datetime="2009-10-09T14:28-08:00"></time></p>
 </header>
 <p>If there's a microphone anywhere near you, assume it's hot and
 sending whatever you're saying to the world. Seriously.</p>
 <p>...</p>
 <section>
  <h1>Comments</h1>
  <article>
    <footer>
      <p>Posted by: George Washington</p>
      <p><time pubdate datetime="2009-10-10T19:10-08:00"></time></p>
    </footer>
    <p>Yeah! Especially when talking about your lobbyist friends!</p>
  </article>
 </section>
</article>




             http://dev.w3.org/html5/spec/sections.html#the-article-element
<article>
    <header>
   <h1>Title</h1>
<p><time pubdate></p>
     </header>

  <p>Centent</p>

     <section>
 <h1>Comments</h1>
      <article>
       <footer>
    <p>Posted by</p>

 <p><time pubdate></p>
       </footer>
        <p></p>
      </article>
     </section>
 </article>
New Elements


    <figure>
   <figcaption>
for




http://html5doctor.com/the-figure-figcaption-elements/
Actually for
• Everything
 • image
 • code
 • blockquote
 • video
 • ...etc
Examples

<figure>
  <img src="bubbles-work.jpeg"
        alt="Bubbles, sitting in his office chair, works on his
             latest project intently.">
  <figcaption>Bubbles at work</figcaption>
</figure>




     http://dev.w3.org/html5/spec/grouping-content.html#the-figure-element
Examples

<figure>
  <p>'Twas brillig, and the slithy toves<br>
  Did gyre and gimble in the wabe;<br>
  All mimsy were the borogoves,<br>
  And the mome raths outgrabe.</p>
  <figcaption><cite>Jabberwocky</cite> (first verse).
Lewis Carroll, 1832-98</figcaption>
</figure>




    http://dev.w3.org/html5/spec/grouping-content.html#the-figure-element
And...

<audio>
<video>
<canvas>
<embed>
<dialog>


• dropped !
New Inline Elements
     <b>, <i>, <small>
     <ruby>, <rt>, <rp>
          <mark>
          <time>
            <a>
b, i, small redefine

• <b> for typographic presentation is boldened
• <i> for alternate voice or mood
• <small> for small print
<ruby>


not on Rails
TOSSUG HTML5 讀書會 新標籤與表單
Ruby Markup

                <ruby>
                    <rt>                    </rt>
                    <rt>                    </rt>
                </ruby>




http://dev.w3.org/html5/spec/text-level-semantics.html#the-ruby-element
<rp>

<ruby>
    <rp>(</rp><rt>   </rt><rp>)</rp>
    <rp>(</rp><rt> </rt><rp>)</rp>
</ruby>




                       (            )          (      )
  http://dev.w3.org/html5/spec/text-level-semantics.html#the-rp-element
<mark>
mark usage

•
•
•              highlight
• ...etc
Example
<p lang="en-US">Consider the following quote:</p>
<blockquote lang="en-GB">
  <p>Look around and you will find, no-one's really
  <mark>colour</mark> blind.</p>
</blockquote>
<p lang="en-US">As we can tell from the <em>spelling</em> of the word,
the person writing this quote is clearly not American.</p>




           http://dev.w3.org/html5/spec/text-level-semantics.html#the-mark-element
<time>
Example

<time datetime="2006-09-23">a Saturday</time>
<time pubdate datetime="2009-08-30">today</time>




         http://dev.w3.org/html5/spec/text-level-semantics.html#the-time-element
Annoying pubdate

• without pubdate : just a time
• with pubdate : page publish time
• with pubdate and inside an <article> :
  article’s publish time
<a>

• block level link howto ?
 • XHTML 2 :
   • href is global level attribute
 • HTML5 ?
Block Level Link in HTML5

    <a href="http://blog.othree.net">
     <p>I'm block. But I always try to be a link too.</p>
     <p>me too.</p>
    </a>




    a{
    
 display: block;
    }
Content Models




 http://dev.w3.org/html5/spec/content-models.html#flow-content
Microdata
Remember Microformats ?
<div class="vcard">
       <span class="fn">Bob Smith</span>
                 <span class="nickname">Smithy</span>

 <a href="http://www.example.com" class="url">www.example.com</a>.
        Albuquerque (NM)               <span class="org">ACME Corp</span>.
      <span class="title">    </span>
</div>




                http://www.google.com/support/webmasters/bin/topic.py?topic=21997
Microdata
<div itemscope itemtype="http://data-vocabulary.org/Person">
       <span itemprop="name">Bob Smith</span>
                  <span itemprop="nickname">Smithy</span>.

 <a href="http://www.example.com" itemprop="url">www.example.com</a>
        Albuquerque (NM)          <span itemprop="title">  </span>
             <span itemprop="affiliation">ACME Corp</span>
</div>




                 http://www.google.com/support/webmasters/bin/topic.py?topic=21997
attributes

• itemscope :
• itemtype :
• itemprop :
APIs

• document . getItems( [ types ] )
• element . properties
• element . itemValue [ = value ]


      http://www.w3.org/TR/2010/WD-microdata-20100624/#microdata-dom-api
No Browser Supports Now
Web Forms 2.0
Where is 1.0 ?
HTML 4.01 Spec




    http://www.w3.org/TR/html401/
What’s New

• New Input Types
• New Attributes
• Form Validation
New Input Types
       url
      email
       tel
     number
      range
      color
      date
<input type="datetime" />
<input type="number" min="99" max="101"/>
<input type="email" placeholder="foo@bar.com" />
DEMO
http://miketaylr.com/pres/html5/forms2.html
And One More Type


       search
New Form Elements


      <output>
      <datalist>
<output>

<form>
 <input name=a type=number step=any> +
 <input name=b type=number step=any> =
 <output onforminput="value = a.valueAsNumber +
b.valueAsNumber"></output>
</form>




      http://dev.w3.org/html5/spec/the-button-element.html#the-output-element
<datalist>
<input type="search" autofocus list="search-suggestions"/>
<datalist id="search-suggestions">
 <option label="DM" value="Depeche Mode">
 <option label="Moz" value="Morrissey">
 <option label="NO" value="New Order">
 <option label="TC" value="The Cure">
</datalist>




              http://miketaylr.com/pres/html5/forms2.html
New Attributes

• autofocus: auto focus
• autocomplete: browser’s auto complete
• placeholder: short hint
• multiple for [type=file]: upload multiple file
Validation

• support new input types
• pattern attribute for <input>
• novalidate attribute for <form>
Opera Supports
http://www.opera.com/docs/specs/presto26/
<datagrid>


• dropped !
Q&A

More Related Content

KEY
WAI-ARIA is More Than Accessibility
PDF
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
PDF
WAI-ARIA
PPTX
SharePoint & jQuery Guide - SPSNashville 2014
PPTX
SPSNH 2014 - The SharePoint & jQueryGuide
PPTX
SPSDenver - SharePoint & jQuery - What I wish I would have known
PDF
Modular HTML, CSS, & JS Workshop
PPTX
Intro to SharePoint Web Services
WAI-ARIA is More Than Accessibility
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA
SharePoint & jQuery Guide - SPSNashville 2014
SPSNH 2014 - The SharePoint & jQueryGuide
SPSDenver - SharePoint & jQuery - What I wish I would have known
Modular HTML, CSS, & JS Workshop
Intro to SharePoint Web Services

What's hot (20)

PPTX
SPTechCon - Share point and jquery essentials
PDF
Be nice to your designers
PPTX
(Updated) SharePoint & jQuery Guide
PDF
HTML5, just another presentation :)
PPTX
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
KEY
2022 HTML5: The future is now
PDF
Whirlwind Tour of SVG (plus RaphaelJS)
PPTX
Challenges going mobile
PDF
Modular HTML & CSS
PPTX
SharePoint Saturday St. Louis - SharePoint & jQuery
PPTX
Introduction to Client Side Dev in SharePoint Workshop
PDF
Multi screen HTML5
PDF
Take Your Markup to 11
PPTX
SPTechCon 2014 How to develop and debug client side code in SharePoint
PPT
PDF
CSS Frameworks
PDF
NOW I Get it!! What SharePoint IS and why I need it
PDF
Modular HTML & CSS Workshop
PDF
Modular HTML & CSS Turbo Workshop
PPTX
SharePoint & jQuery Guide - SPSTC 5/18/2013
SPTechCon - Share point and jquery essentials
Be nice to your designers
(Updated) SharePoint & jQuery Guide
HTML5, just another presentation :)
2/15/2012 - Wrapping Your Head Around the SharePoint Beast
2022 HTML5: The future is now
Whirlwind Tour of SVG (plus RaphaelJS)
Challenges going mobile
Modular HTML & CSS
SharePoint Saturday St. Louis - SharePoint & jQuery
Introduction to Client Side Dev in SharePoint Workshop
Multi screen HTML5
Take Your Markup to 11
SPTechCon 2014 How to develop and debug client side code in SharePoint
CSS Frameworks
NOW I Get it!! What SharePoint IS and why I need it
Modular HTML & CSS Workshop
Modular HTML & CSS Turbo Workshop
SharePoint & jQuery Guide - SPSTC 5/18/2013
Ad

Viewers also liked (11)

PDF
2012 php conf slide PIXNET 如何使用 php
PDF
尼古丁加咖啡因,不瞌睡的简报設計模式 (Caffeine+Nicotine)
PDF
版本控制 使用Git & git hub
PPTX
Aggregation in MongoDB
PDF
Card sorting
PDF
What Can Compilers Do for Us?
PDF
High Performance JavaScript - WebDirections USA 2010
PDF
那些mockup沒告訴你的事@WebConf.tw 2013
PDF
寫給大家的 Git 教學
PDF
[系列活動] Machine Learning 機器學習課程
PPTX
cPanel - Apache Global Configuration
2012 php conf slide PIXNET 如何使用 php
尼古丁加咖啡因,不瞌睡的简报設計模式 (Caffeine+Nicotine)
版本控制 使用Git & git hub
Aggregation in MongoDB
Card sorting
What Can Compilers Do for Us?
High Performance JavaScript - WebDirections USA 2010
那些mockup沒告訴你的事@WebConf.tw 2013
寫給大家的 Git 教學
[系列活動] Machine Learning 機器學習課程
cPanel - Apache Global Configuration
Ad

Similar to TOSSUG HTML5 讀書會 新標籤與表單 (20)

PDF
An Introduction To HTML5
KEY
Artdm171 Week4 Tags
PDF
HTML5, The Open Web, and what it means for you - Altran
PDF
HTML5 workshop, part 1
PDF
HTML5 Essentials
PDF
Webware - 문서에서 운영 체제 까지 - 윤석찬 (2014)
PDF
[O'Reilly] HTML5 Design
PDF
Introduction to web components
PPTX
Microdata semantic-extend
KEY
Darwin web standards
PDF
HTML5 & CSS3 Flag
PDF
KEY
PDF
[heweb11] HTML5 Makeover
PDF
Seo Cheat Sheet
PDF
Seo cheat-sheet
PDF
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
PDF
[Access U 2010] HTML5 & Accessibility
PDF
[edUi] HTML5 Workshop
PDF
HTML5+CSS3 (入門編)
An Introduction To HTML5
Artdm171 Week4 Tags
HTML5, The Open Web, and what it means for you - Altran
HTML5 workshop, part 1
HTML5 Essentials
Webware - 문서에서 운영 체제 까지 - 윤석찬 (2014)
[O'Reilly] HTML5 Design
Introduction to web components
Microdata semantic-extend
Darwin web standards
HTML5 & CSS3 Flag
[heweb11] HTML5 Makeover
Seo Cheat Sheet
Seo cheat-sheet
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[Access U 2010] HTML5 & Accessibility
[edUi] HTML5 Workshop
HTML5+CSS3 (入門編)

More from 偉格 高 (12)

PDF
node ffi
PDF
ECMAScript 6
PDF
Web Component
PDF
Mobile web application
PDF
PDF
Web Developer Tools for ICOS 2013
PDF
Functional programming using underscorejs
PDF
Module, AMD, RequireJS
PDF
Javascript essential-pattern
KEY
Vim Plugin Deployment
PDF
Html5 New Features
PDF
Base2
node ffi
ECMAScript 6
Web Component
Mobile web application
Web Developer Tools for ICOS 2013
Functional programming using underscorejs
Module, AMD, RequireJS
Javascript essential-pattern
Vim Plugin Deployment
Html5 New Features
Base2

Recently uploaded (20)

PPTX
Machine Learning_overview_presentation.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Cloud computing and distributed systems.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation_ Review paper, used for researhc scholars
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine Learning_overview_presentation.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools
Cloud computing and distributed systems.
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectroscopy.pptx food analysis technology
Encapsulation_ Review paper, used for researhc scholars
The AUB Centre for AI in Media Proposal.docx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

TOSSUG HTML5 讀書會 新標籤與表單

  • 1. HTML5 The Missing Part othree
  • 2. Outline • Semantic Web • HTML5 • Web Forms 2.0
  • 3. Semantic Web • Tim Bernes Lee
  • 7. How ? • XML for data • (X)HTML for web content
  • 8. (X)HTML Standards • HTML 4.01: Still using today • XHTML 1: Bridge between HTML and XML • XHTML 1.1: Preparing for Semantic Web • XHTML 2.0 ( )
  • 9. XHTML 2.0 • • • ex: no <h1> ~ <h6>, <br>
  • 11. How ? • • <table> for not • <p> for • <h1> ~ <h6> for not • <blockquote> for not • <b>, <i>, <u>, <big>, <small>
  • 13. 2nd Step • RDFa, Microformats ... etc
  • 14. HTML <div> Bob Smith Smithy <a href="http://www.example.com">www.example.com</a>. Albuquerque (NM) ACME Corp. </div> http://www.google.com/support/webmasters/bin/topic.py?topic=21997
  • 15. vCard BEGIN:VCARD VERSION:3.0 N:Bob Smith FN:Bob Smith NICKNAME:Smithy URL: http://www.example.com TITLE: ORG:ACME Corp ADR;TYPE=work:;;;Albuquerque;NM;; END:VCARD http://www.google.com/support/webmasters/bin/topic.py?topic=21997
  • 16. RDFa <div xmlns:v="http://rdf.data-vocabulary.org/#" typeof="v:Person"> <span property="v:name">Bob Smith</span> <span property="v:nickname">Smithy</span> <a href="http://www.example.com" rel="v:url">www.example.com</a>. Albuquerque (NM) <span property="v:affiliation">ACME Corp</span>. <span property="v:title"> </span> </div> http://www.google.com/support/webmasters/bin/topic.py?topic=21997
  • 17. Microformats <div class="vcard"> <span class="fn">Bob Smith</span> <span class="nickname">Smithy</span> <a href="http://www.example.com" class="url">www.example.com</a>. Albuquerque (NM) <span class="org">ACME Corp</span>. <span class="title"> </span> </div> http://www.google.com/support/webmasters/bin/topic.py?topic=21997
  • 18. Microformats hCalendar hCard rel-license rel-nofollow rel-tag XFN XOXO ...
  • 19. Benefits • (Accessibility) • SEO • •
  • 20. HTML Standards • HTML 4.01: Still using today • XHTML 1: Bridge between HTML and XML • XHTML 1.1: Preparing for Semantic Web • XHTML 2.0 ( ) • (X)HTML5 by WHATWG
  • 22. New Structure Elements <header> <footer> <nav> <aside> <article> <hgroup> <section>
  • 23. A Web Page <div id=”header”></div> <ul id=”navigator”></ul> <div id=”sidebar”> <div id=”content”></div> </div> <div id=”footer”></div>
  • 24. A Web Page in HTML5 <header></header> <nav></nav> <aside> <div id=”content”></div> </aside> <footer></footer>
  • 25. Structure Elements • <header> • <footer> • <aside> • <nav>
  • 26. Weblog Index <div class=”entry”></div> <div class=”entry”></div> <div class=”entry”></div>
  • 27. Weblog Index <article></article> <article></article> <article></article>
  • 29. An Article <h1></h1> <p></p> <h2></h2> <p></p> <h2></h2> <p></p>
  • 30. An Article <h1></h1> <p></p> <section> <h2></h2> <p></p> <h2></h2> <p></p> </section>
  • 31. <hgroup> <hgroup> <h1>My Weblog</h1> <h2 class="tagline">A lot of effort went into making this effortless.</h2> </hgroup> <div class="entry"> <h2>Travel day</h2> </div> <div class="entry"> <h2>I'm going to Prague!</h2> </div> http://diveintohtml5.org/semantics.html
  • 32. Outline • My Weblog • Travel day • I'm going to Prague! http://diveintohtml5.org/semantics.html
  • 33. Site Title and Article Title <h1>My Weblog</h1> <h2 class="tagline">A lot of effort went into making this effortless.</h2> <div class="entry"> <h2>Travel day</h2> </div> <div class="entry"> <h2>I'm going to Prague!</h2> </div> http://diveintohtml5.org/semantics.html
  • 34. Outline • My Weblog • A lot of effort went into making this effortless • Travel day • I'm going to Prague! http://diveintohtml5.org/semantics.html
  • 35. Mixin • Is <article> in <article> valid ? • Is <article> in <section> valid ? • How about <header> in <article> ?
  • 36. Yes <article> <header> <h1>The Very First Rule of Life</h1> <p><time pubdate datetime="2009-10-09T14:28-08:00"></time></p> </header> <p>If there's a microphone anywhere near you, assume it's hot and sending whatever you're saying to the world. Seriously.</p> <p>...</p> <section> <h1>Comments</h1> <article> <footer> <p>Posted by: George Washington</p> <p><time pubdate datetime="2009-10-10T19:10-08:00"></time></p> </footer> <p>Yeah! Especially when talking about your lobbyist friends!</p> </article> </section> </article> http://dev.w3.org/html5/spec/sections.html#the-article-element
  • 37. <article> <header> <h1>Title</h1> <p><time pubdate></p> </header> <p>Centent</p> <section> <h1>Comments</h1> <article> <footer> <p>Posted by</p> <p><time pubdate></p> </footer> <p></p> </article> </section> </article>
  • 38. New Elements <figure> <figcaption>
  • 40. Actually for • Everything • image • code • blockquote • video • ...etc
  • 41. Examples <figure> <img src="bubbles-work.jpeg" alt="Bubbles, sitting in his office chair, works on his latest project intently."> <figcaption>Bubbles at work</figcaption> </figure> http://dev.w3.org/html5/spec/grouping-content.html#the-figure-element
  • 42. Examples <figure> <p>'Twas brillig, and the slithy toves<br> Did gyre and gimble in the wabe;<br> All mimsy were the borogoves,<br> And the mome raths outgrabe.</p> <figcaption><cite>Jabberwocky</cite> (first verse). Lewis Carroll, 1832-98</figcaption> </figure> http://dev.w3.org/html5/spec/grouping-content.html#the-figure-element
  • 45. New Inline Elements <b>, <i>, <small> <ruby>, <rt>, <rp> <mark> <time> <a>
  • 46. b, i, small redefine • <b> for typographic presentation is boldened • <i> for alternate voice or mood • <small> for small print
  • 49. Ruby Markup <ruby> <rt> </rt> <rt> </rt> </ruby> http://dev.w3.org/html5/spec/text-level-semantics.html#the-ruby-element
  • 50. <rp> <ruby> <rp>(</rp><rt> </rt><rp>)</rp> <rp>(</rp><rt> </rt><rp>)</rp> </ruby> ( ) ( ) http://dev.w3.org/html5/spec/text-level-semantics.html#the-rp-element
  • 52. mark usage • • • highlight • ...etc
  • 53. Example <p lang="en-US">Consider the following quote:</p> <blockquote lang="en-GB"> <p>Look around and you will find, no-one's really <mark>colour</mark> blind.</p> </blockquote> <p lang="en-US">As we can tell from the <em>spelling</em> of the word, the person writing this quote is clearly not American.</p> http://dev.w3.org/html5/spec/text-level-semantics.html#the-mark-element
  • 55. Example <time datetime="2006-09-23">a Saturday</time> <time pubdate datetime="2009-08-30">today</time> http://dev.w3.org/html5/spec/text-level-semantics.html#the-time-element
  • 56. Annoying pubdate • without pubdate : just a time • with pubdate : page publish time • with pubdate and inside an <article> : article’s publish time
  • 57. <a> • block level link howto ? • XHTML 2 : • href is global level attribute • HTML5 ?
  • 58. Block Level Link in HTML5 <a href="http://blog.othree.net"> <p>I'm block. But I always try to be a link too.</p> <p>me too.</p> </a> a{ display: block; }
  • 61. Remember Microformats ? <div class="vcard"> <span class="fn">Bob Smith</span> <span class="nickname">Smithy</span> <a href="http://www.example.com" class="url">www.example.com</a>. Albuquerque (NM) <span class="org">ACME Corp</span>. <span class="title"> </span> </div> http://www.google.com/support/webmasters/bin/topic.py?topic=21997
  • 62. Microdata <div itemscope itemtype="http://data-vocabulary.org/Person"> <span itemprop="name">Bob Smith</span> <span itemprop="nickname">Smithy</span>. <a href="http://www.example.com" itemprop="url">www.example.com</a> Albuquerque (NM) <span itemprop="title"> </span> <span itemprop="affiliation">ACME Corp</span> </div> http://www.google.com/support/webmasters/bin/topic.py?topic=21997
  • 63. attributes • itemscope : • itemtype : • itemprop :
  • 64. APIs • document . getItems( [ types ] ) • element . properties • element . itemValue [ = value ] http://www.w3.org/TR/2010/WD-microdata-20100624/#microdata-dom-api
  • 68. HTML 4.01 Spec http://www.w3.org/TR/html401/
  • 69. What’s New • New Input Types • New Attributes • Form Validation
  • 70. New Input Types url email tel number range color date
  • 71. <input type="datetime" /> <input type="number" min="99" max="101"/> <input type="email" placeholder="foo@bar.com" />
  • 73. And One More Type search
  • 74. New Form Elements <output> <datalist>
  • 75. <output> <form> <input name=a type=number step=any> + <input name=b type=number step=any> = <output onforminput="value = a.valueAsNumber + b.valueAsNumber"></output> </form> http://dev.w3.org/html5/spec/the-button-element.html#the-output-element
  • 76. <datalist> <input type="search" autofocus list="search-suggestions"/> <datalist id="search-suggestions"> <option label="DM" value="Depeche Mode"> <option label="Moz" value="Morrissey"> <option label="NO" value="New Order"> <option label="TC" value="The Cure"> </datalist> http://miketaylr.com/pres/html5/forms2.html
  • 77. New Attributes • autofocus: auto focus • autocomplete: browser’s auto complete • placeholder: short hint • multiple for [type=file]: upload multiple file
  • 78. Validation • support new input types • pattern attribute for <input> • novalidate attribute for <form>
  • 81. Q&A