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
Html5 training
KEY
Darwin web standards
PPTX
Hardcore HTML
PDF
A practical guide to building websites with HTML5 & CSS3
PDF
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
PDF
Html5 p resentation by techmodi
PDF
HTML5 - An introduction
PDF
HTML5 - getting started
ODP
Light introduction to HTML
PDF
Intro to HTML 5 / CSS 3
PPTX
Unit 1wt
DOC
web technologiesUnit 1
PDF
HTML5 - Introduction
PDF
Web Design for Literary Theorists III: Machines Read, Too (just not well) (v ...
PDF
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
PPTX
Unit 1wt
KEY
Html5 Brown Bag
PPTX
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
KEY
Artdm171 Week4 Tags
Html5 training
Darwin web standards
Hardcore HTML
A practical guide to building websites with HTML5 & CSS3
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
Html5 p resentation by techmodi
HTML5 - An introduction
HTML5 - getting started
Light introduction to HTML
Intro to HTML 5 / CSS 3
Unit 1wt
web technologiesUnit 1
HTML5 - Introduction
Web Design for Literary Theorists III: Machines Read, Too (just not well) (v ...
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Unit 1wt
Html5 Brown Bag
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Artdm171 Week4 Tags

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
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Event Presentation Google Cloud Next Extended 2025
PDF
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 2 Digital Image Fundamentals.pdf
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PDF
Google’s NotebookLM Unveils Video Overviews
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
REPORT: Heating appliances market in Poland 2024
PPTX
CroxyProxy Instagram Access id login.pptx
PPTX
How to Build Crypto Derivative Exchanges from Scratch.pptx
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Event Presentation Google Cloud Next Extended 2025
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
A Day in the Life of Location Data - Turning Where into How.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 2 Digital Image Fundamentals.pdf
madgavkar20181017ppt McKinsey Presentation.pdf
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
Google’s NotebookLM Unveils Video Overviews
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
GamePlan Trading System Review: Professional Trader's Honest Take
REPORT: Heating appliances market in Poland 2024
CroxyProxy Instagram Access id login.pptx
How to Build Crypto Derivative Exchanges from Scratch.pptx

TOSSUG HTML5 讀書會 新標籤與表單