SlideShare une entreprise Scribd logo
1  sur  103
HTML5 Semantic Web Terry Ryan |  Worldwide Developer Evangelist @tpryan
Who are you? 2
Not Sexy and Adventurous 3
It’s everyday stuff 4
Agenda Introduction Overview of Semantics New Semantic elements  New Semantic attributes  New Form Input Types New Form attributes Pitfalls Conclusions 5
Overview 6 Semantics
Semantic HTML means your markup describes it’s content without Presenting it  7
What do we mean by Semantic HTML HTML where proper elements are used <p> denotes paragraph <ul> denotes an list of items, where the order is not important  <address> contains address information <div> and <span> are used to describe information HTML where extraneous elements are not misused No <p> for line breaking No <blockquote> for indentation No <h1> for big text HTML without presentation information No <font>, <b>, <i> tags No inline styles 8
Semantic HTML is a moving target Not Boolean Not always objective A continuum 9
Semantic HTML <body background="css/bg.png"> <font face="Calibri”><center> <table width="800" bgcolor="#FFFFFF" border="10" bordercolor="#FFFFFF"> <tr><td> <tablewidth="100%" bgcolor="#f0f0f0" border="0“> <tr> <td><h1> <fontface="Palatino Linotype">The Awesome Blog ofAwesome</font> </h1> </td> </tr> <tr>     <td align="right"><p><i>Awesome is a State of Mind</i></p></td> </tr> </table> 10 <body> <div id="header"> <h1>The Awesome Blog of Awesome</h1> <p class="tagline">Awesome is a State of Mind</p> </div> Relatively Unsemantic Relatively Semantic
HTML5? 11 What does this have to do with HTML5?
HTML5 adds more semantics <body> <header> <h1>The Awesome Blog of Awesome</h1> <p>Awesome is a State of Mind</p> </header> <nav> <ul> <li><ahref="">Home</a></li> <li><ahref="">Blog</a></li> <li><ahref="">About</a></li> <li><ahref="">Contact</a></li> </ul> </nav> 12
Introducing The Awesome Blog of Awesome 13 HTML5 XHTML
Elements 14
Header 15
Header <div id="header"> <h1>The Awesome Blog of Awesome</h1> 	<p class="tagline">Awesome is a State of Mind</p> </div> 16 <header> <hgroup> <h1>The Awesome Blog of Awesome</h1> <h2>Awesome is a State of Mind</h2> </hgroup> </header> HTML 5 Previously
Hgroup? 17 What’s the <hgroup> all about?
Hgroup 18 <hgroup> <h1></h1> 	<h2></h2> </hgroup> It’s for grouping related headers, that don’t spawn their own node in the outline
Hgroup? 19 Huh?
Effect of hgroup ,[object Object]
H2 - Awesome is a State of Mind
H2 - Recent Posts
H3 I Made a Post Thingie
H3 My Thoughts are made manifest 20 ,[object Object]
H2 Recent Posts
H3 I Made a Post Thingie
H3 My Thoughts are made manifest No Hgroup With HGroup
Hgroup? 21 Still huh?
Outlines Outlines seem really important to the people who push semantic HTML 5 Are they really important? Today: No Tomorrow: Who knows? But this is a semantically correct way of reducing classes and extraneous divs 22
Footer 23
Footer <div id="footer”> <p>Copyright 2011 - Terry Ryan</p> </div> 24 <footer> <p>Copyright 2011 - Terry Ryan</p> </footer> HTML 5 Previously
Navigation 25
Navigation <div id="nav">   <ul>     <li><a href="">Home</a></li>     <li><a href="">Blog</a></li>     <li><a href="">About</a></li>     <li><a href="">Contact</a></li>   </ul> </div> 26 <nav> <ul>     <li><a href="">Home</a></li>     <li><a href="">Blog</a></li>     <li><a href="">About</a></li>     <li><a href="">Contact</a></li>   </ul> </nav> Previously HTML 5
Articles 27
Articles <divclass="post”> <divclass="postheader"> <h3><ahref="">I Scream My Thoughts</a></h3> <pclass="date">August 10, 2011</p> </div> <p>You probably haven't heard of them duis</p> </div> 28 <article>  <header>   <h1><ahref="">I Scream My Thoughts</a></h1>   <time>August 10, 2011</time>  </header>  <p>You probably haven't heard of them duis</p> </article> Previously HTML5
An article is a piece of content that can stand on it’s own 29
Date and Time <time datetime={datetime} pubdate>Human Readable String</time> Datetime Date: 2011-09-20 Datetime: 2011-09-20T20:00Z Datetime: 2011-09-20T20:00+00:00 Pubdate Used with article to denote that this particular time is the publication date.  30
Date Time 31 Just the  letter T 2011-09-20T20:00Z Z for  Zulu Time Hours:Minutes Year-Month-Day Just the  letter T 2011-09-20T20:00+00:00 Year-Month-Day Hours:Minutes Time Zone Offset
Section? 32 There’s also this thing called “<section>” how does that work.
An Article is a piece of stand-alone content 33
Blog Post 34
Or a comment 35
A section is a collection of related pieces of content 36
37
Articles can contain Sections 38
Blog Post 39 Article Section Section Section
Sections can contain Articles 40
Articles can contain other articles 41
42 Article Section Section Section Article Article
Content 43
Content <divclass=”content”>  <divclass="post”>  ...  </div>  <divclass="post”>  ...  </div>  <divclass="post”>  ...  </div> </div> 44 <divclass=”content”>  <article>  ...  </article> <article>  ...  </article> <article>  ...  <article> </div> Previously HTML5
Also can be correct <divclass=”content”>  <divclass="post”>  ...  </div>  <divclass="post”>  ...  </div>  <divclass="post”>  ...  </div> </div> 45 <section class=”content”>  <article>  ...  </article> <article>  ...  </article> <article>  ...  <article> </section> Previously HTML5
Umm 46 That’s great, but frankly not that much of a different, how is that better?
Benefit 1   </div>  </div>     </div> <div id=“footer”> </div> </body> 47   </div>  </article>     </div> <footer> </footer> </body> Before these Elements After
Benefit 2 Less monkeying with content hierarchies 48
49 Post Page Main Page Archive Page <article>  <header>   <h1><a href="">I Made a Post Thingie</a></h1>   <time datetime="2011-09-02">September 2, 2011</time>  </header>  <imgsrc="img/captain-awesome.jpg" width="300" height="200" alt="Image of Captain Awesome" />  <p>DIY eanulla photo booth temporoccaecat, velitnihilmixtapescenester.   Irony laboris echo park, wolf officia vice cupidatatlabore butcher freegan  farm-to-table nisi velitaliqua gluten-free. Aliquipnesciuntassumenda,   wayfarers seitan wolf reprehenderitnulla twee sartorial dolore food truck  voluptateex vinyl. Aliquip ex enim, irony terry richardson trust fund consectetur fappariatur dolor. Lo-fi nulla whatever mlkshk, banksyamerican apparel carles adipisicingincididunt wolf photo booth hipster. Wayfarers four loko ex cosby sweater,  adipisicingsartorial non cardigan craft beer cillumreprehenderit terry richardson  3 wolf moon mollit. Ethical utlabore beard, 3 wolf moon duis readymade assumenda  hipster tofu mcsweeney's master cleanse.</p> </article> article header h1 Article Article Article
Benefit 3 No longer bound to one header or one navcan have multiple.  50
New Elements work across Modern Browsers without Fail 51
What’s you’re definition of Modern? 52
Use the HTML 5 Shiv 53 http://code.google.com/p/html5shiv/
Attributes 54
data 55 ,[object Object]
Uses?
Scritping
Microformats
Perhaps future Search Engine hints.<p data-firstname=“Terry” data-lastname=“Ryan”>Terry Ryan</p>
These next things aren’t semantic, just kinda cool 56
contenteditable 57 ,[object Object]
Uses
Better CMS systems
Comment previews<p contenteditable="true” class="comment">Comment</p>
spellcheck 58 ,[object Object]
Uses:
No one spellchecks anything they post on the web
But you will have the moral high ground to point out on your site they could have. <p contenteditable="true" spellcheck="spellcheck" class="comment">Comment</p>
Form 59 Input
HTML5 includes lots of new Input types 60
They aren’t supported on every browser 61
All browsers default to showing unknown input types as Text 62
Search 63 ,[object Object]
Browser vendors tend to round, add magnifying glass, etc. <input type=“search” name=“search” />
Email 64 ,[object Object]
Provides email keyboard on iOS devices.<input type=“email” name=“email” />
Url 65 ,[object Object]
Provides url keyboard on iOS devices.<input type=“url” name=“url” />
Number 66 ,[object Object]
Provides a stepper on desktops
Takes attributes:
Min/Max
Step<input type=“number” name=“cost” />
Tel 67 ,[object Object],<input type=“tel” name=“cell” />
Not well supported, but have potential 68
Range 69 ,[object Object]
The slider allows you to pick one
Not terribly precise
Takes attributes:
Min/Max
Step<input type=“range” name=“volume” />
Date 70 ,[object Object]
On Opera
Displays a data picker
On Safari/Chrome
Displays ticker

Contenu connexe

Similaire à HTML5 Semantic Web

How to use a blog for publishing scientific research: A training guide part 2
How to use a blog for publishing scientific research: A training guide part 2How to use a blog for publishing scientific research: A training guide part 2
How to use a blog for publishing scientific research: A training guide part 2AfricanCommonsProject
 
HTML5: New Possibilities for Publishing
HTML5: New Possibilities for PublishingHTML5: New Possibilities for Publishing
HTML5: New Possibilities for PublishingiFactory
 
HTML5 - techMaine Presentation 5/18/09
HTML5 - techMaine Presentation 5/18/09HTML5 - techMaine Presentation 5/18/09
HTML5 - techMaine Presentation 5/18/09pemaquid
 
Html 5 a step towards semantic web
Html 5   a step towards semantic webHtml 5   a step towards semantic web
Html 5 a step towards semantic webSachin Khosla
 
HTML5 - One spec to rule them all
HTML5 - One spec to rule them allHTML5 - One spec to rule them all
HTML5 - One spec to rule them allStu King
 
Successful Teams follow Standards
Successful Teams follow StandardsSuccessful Teams follow Standards
Successful Teams follow StandardsChristian Heilmann
 
Html Intro2
Html Intro2Html Intro2
Html Intro2mlackner
 
Using HTML5 and CSS3 today
Using HTML5 and CSS3 todayUsing HTML5 and CSS3 today
Using HTML5 and CSS3 todaythebeebs
 
Developer Grade SEO - part II
Developer Grade SEO - part IIDeveloper Grade SEO - part II
Developer Grade SEO - part IIPhil Buckley
 
Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Matthew Mobbs
 
Hour 02
Hour 02Hour 02
Hour 02dpd
 
Creating A Forensics Webpage
Creating A Forensics WebpageCreating A Forensics Webpage
Creating A Forensics WebpageSteve Bishop
 

Similaire à HTML5 Semantic Web (20)

How to use a blog for publishing scientific research: A training guide part 2
How to use a blog for publishing scientific research: A training guide part 2How to use a blog for publishing scientific research: A training guide part 2
How to use a blog for publishing scientific research: A training guide part 2
 
HTML5: New Possibilities for Publishing
HTML5: New Possibilities for PublishingHTML5: New Possibilities for Publishing
HTML5: New Possibilities for Publishing
 
HTML5 - techMaine Presentation 5/18/09
HTML5 - techMaine Presentation 5/18/09HTML5 - techMaine Presentation 5/18/09
HTML5 - techMaine Presentation 5/18/09
 
Intro to html
Intro to htmlIntro to html
Intro to html
 
Intro to html
Intro to htmlIntro to html
Intro to html
 
Html 5 a step towards semantic web
Html 5   a step towards semantic webHtml 5   a step towards semantic web
Html 5 a step towards semantic web
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
HTML5 - One spec to rule them all
HTML5 - One spec to rule them allHTML5 - One spec to rule them all
HTML5 - One spec to rule them all
 
Wordpress & HTML5 by Rob Larsen
Wordpress & HTML5 by Rob LarsenWordpress & HTML5 by Rob Larsen
Wordpress & HTML5 by Rob Larsen
 
Successful Teams follow Standards
Successful Teams follow StandardsSuccessful Teams follow Standards
Successful Teams follow Standards
 
Html Intro2
Html Intro2Html Intro2
Html Intro2
 
Using HTML5 and CSS3 today
Using HTML5 and CSS3 todayUsing HTML5 and CSS3 today
Using HTML5 and CSS3 today
 
Developer Grade SEO - part II
Developer Grade SEO - part IIDeveloper Grade SEO - part II
Developer Grade SEO - part II
 
Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010
 
AK html
AK  htmlAK  html
AK html
 
Html 5.0
Html 5.0Html 5.0
Html 5.0
 
Hour 02
Hour 02Hour 02
Hour 02
 
Creating A Forensics Webpage
Creating A Forensics WebpageCreating A Forensics Webpage
Creating A Forensics Webpage
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Html5 accessibility
Html5 accessibilityHtml5 accessibility
Html5 accessibility
 

Plus de Terry Ryan

Making the Mobile Web Work
Making the Mobile Web WorkMaking the Mobile Web Work
Making the Mobile Web WorkTerry Ryan
 
The Users are Restless
The Users are RestlessThe Users are Restless
The Users are RestlessTerry Ryan
 
HTML Design for Devices
HTML Design for DevicesHTML Design for Devices
HTML Design for DevicesTerry Ryan
 
The Future of HTML5 Motion Design
 The Future of HTML5 Motion Design The Future of HTML5 Motion Design
The Future of HTML5 Motion DesignTerry Ryan
 
Adobe and Modern Web Development
Adobe and Modern Web DevelopmentAdobe and Modern Web Development
Adobe and Modern Web DevelopmentTerry Ryan
 
Semantic HTML5
Semantic HTML5Semantic HTML5
Semantic HTML5Terry Ryan
 
The Future of HTML Motion Design
The Future of HTML Motion DesignThe Future of HTML Motion Design
The Future of HTML Motion DesignTerry Ryan
 
Skip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildSkip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildTerry Ryan
 
Beautiful PhoneGap Apps
Beautiful PhoneGap AppsBeautiful PhoneGap Apps
Beautiful PhoneGap AppsTerry Ryan
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Terry Ryan
 
The Future of HTML5 Motion Design
The Future of HTML5 Motion DesignThe Future of HTML5 Motion Design
The Future of HTML5 Motion DesignTerry Ryan
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileTerry Ryan
 
cf.Objective ANZ Keynote
cf.Objective ANZ Keynotecf.Objective ANZ Keynote
cf.Objective ANZ KeynoteTerry Ryan
 
Flex Mobile Skinning Workshop
Flex Mobile Skinning WorkshopFlex Mobile Skinning Workshop
Flex Mobile Skinning WorkshopTerry Ryan
 
Intro to Coldfusion
Intro to ColdfusionIntro to Coldfusion
Intro to ColdfusionTerry Ryan
 
Mobile Apps with ColdFusion
Mobile Apps with ColdFusionMobile Apps with ColdFusion
Mobile Apps with ColdFusionTerry Ryan
 
Developing Apps for the BlackBerry PlayBook
Developing Apps for the BlackBerry PlayBook Developing Apps for the BlackBerry PlayBook
Developing Apps for the BlackBerry PlayBook Terry Ryan
 
Building apps for multiple devices
Building apps for multiple devicesBuilding apps for multiple devices
Building apps for multiple devicesTerry Ryan
 
ColdFusion Builder Extensions
ColdFusion Builder ExtensionsColdFusion Builder Extensions
ColdFusion Builder ExtensionsTerry Ryan
 

Plus de Terry Ryan (20)

Making the Mobile Web Work
Making the Mobile Web WorkMaking the Mobile Web Work
Making the Mobile Web Work
 
The Users are Restless
The Users are RestlessThe Users are Restless
The Users are Restless
 
HTML Design for Devices
HTML Design for DevicesHTML Design for Devices
HTML Design for Devices
 
The Future of HTML5 Motion Design
 The Future of HTML5 Motion Design The Future of HTML5 Motion Design
The Future of HTML5 Motion Design
 
Adobe and Modern Web Development
Adobe and Modern Web DevelopmentAdobe and Modern Web Development
Adobe and Modern Web Development
 
Semantic HTML5
Semantic HTML5Semantic HTML5
Semantic HTML5
 
The Future of HTML Motion Design
The Future of HTML Motion DesignThe Future of HTML Motion Design
The Future of HTML Motion Design
 
Skip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildSkip the IDE with PhoneGap Build
Skip the IDE with PhoneGap Build
 
WebDU Keynote
WebDU KeynoteWebDU Keynote
WebDU Keynote
 
Beautiful PhoneGap Apps
Beautiful PhoneGap AppsBeautiful PhoneGap Apps
Beautiful PhoneGap Apps
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
The Future of HTML5 Motion Design
The Future of HTML5 Motion DesignThe Future of HTML5 Motion Design
The Future of HTML5 Motion Design
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery Mobile
 
cf.Objective ANZ Keynote
cf.Objective ANZ Keynotecf.Objective ANZ Keynote
cf.Objective ANZ Keynote
 
Flex Mobile Skinning Workshop
Flex Mobile Skinning WorkshopFlex Mobile Skinning Workshop
Flex Mobile Skinning Workshop
 
Intro to Coldfusion
Intro to ColdfusionIntro to Coldfusion
Intro to Coldfusion
 
Mobile Apps with ColdFusion
Mobile Apps with ColdFusionMobile Apps with ColdFusion
Mobile Apps with ColdFusion
 
Developing Apps for the BlackBerry PlayBook
Developing Apps for the BlackBerry PlayBook Developing Apps for the BlackBerry PlayBook
Developing Apps for the BlackBerry PlayBook
 
Building apps for multiple devices
Building apps for multiple devicesBuilding apps for multiple devices
Building apps for multiple devices
 
ColdFusion Builder Extensions
ColdFusion Builder ExtensionsColdFusion Builder Extensions
ColdFusion Builder Extensions
 

Dernier

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Dernier (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

HTML5 Semantic Web

  • 1. HTML5 Semantic Web Terry Ryan | Worldwide Developer Evangelist @tpryan
  • 3. Not Sexy and Adventurous 3
  • 5. Agenda Introduction Overview of Semantics New Semantic elements New Semantic attributes New Form Input Types New Form attributes Pitfalls Conclusions 5
  • 7. Semantic HTML means your markup describes it’s content without Presenting it 7
  • 8. What do we mean by Semantic HTML HTML where proper elements are used <p> denotes paragraph <ul> denotes an list of items, where the order is not important <address> contains address information <div> and <span> are used to describe information HTML where extraneous elements are not misused No <p> for line breaking No <blockquote> for indentation No <h1> for big text HTML without presentation information No <font>, <b>, <i> tags No inline styles 8
  • 9. Semantic HTML is a moving target Not Boolean Not always objective A continuum 9
  • 10. Semantic HTML <body background="css/bg.png"> <font face="Calibri”><center> <table width="800" bgcolor="#FFFFFF" border="10" bordercolor="#FFFFFF"> <tr><td> <tablewidth="100%" bgcolor="#f0f0f0" border="0“> <tr> <td><h1> <fontface="Palatino Linotype">The Awesome Blog ofAwesome</font> </h1> </td> </tr> <tr> <td align="right"><p><i>Awesome is a State of Mind</i></p></td> </tr> </table> 10 <body> <div id="header"> <h1>The Awesome Blog of Awesome</h1> <p class="tagline">Awesome is a State of Mind</p> </div> Relatively Unsemantic Relatively Semantic
  • 11. HTML5? 11 What does this have to do with HTML5?
  • 12. HTML5 adds more semantics <body> <header> <h1>The Awesome Blog of Awesome</h1> <p>Awesome is a State of Mind</p> </header> <nav> <ul> <li><ahref="">Home</a></li> <li><ahref="">Blog</a></li> <li><ahref="">About</a></li> <li><ahref="">Contact</a></li> </ul> </nav> 12
  • 13. Introducing The Awesome Blog of Awesome 13 HTML5 XHTML
  • 16. Header <div id="header"> <h1>The Awesome Blog of Awesome</h1> <p class="tagline">Awesome is a State of Mind</p> </div> 16 <header> <hgroup> <h1>The Awesome Blog of Awesome</h1> <h2>Awesome is a State of Mind</h2> </hgroup> </header> HTML 5 Previously
  • 17. Hgroup? 17 What’s the <hgroup> all about?
  • 18. Hgroup 18 <hgroup> <h1></h1> <h2></h2> </hgroup> It’s for grouping related headers, that don’t spawn their own node in the outline
  • 20.
  • 21. H2 - Awesome is a State of Mind
  • 22. H2 - Recent Posts
  • 23. H3 I Made a Post Thingie
  • 24.
  • 26. H3 I Made a Post Thingie
  • 27. H3 My Thoughts are made manifest No Hgroup With HGroup
  • 29. Outlines Outlines seem really important to the people who push semantic HTML 5 Are they really important? Today: No Tomorrow: Who knows? But this is a semantically correct way of reducing classes and extraneous divs 22
  • 31. Footer <div id="footer”> <p>Copyright 2011 - Terry Ryan</p> </div> 24 <footer> <p>Copyright 2011 - Terry Ryan</p> </footer> HTML 5 Previously
  • 33. Navigation <div id="nav"> <ul> <li><a href="">Home</a></li> <li><a href="">Blog</a></li> <li><a href="">About</a></li> <li><a href="">Contact</a></li> </ul> </div> 26 <nav> <ul> <li><a href="">Home</a></li> <li><a href="">Blog</a></li> <li><a href="">About</a></li> <li><a href="">Contact</a></li> </ul> </nav> Previously HTML 5
  • 35. Articles <divclass="post”> <divclass="postheader"> <h3><ahref="">I Scream My Thoughts</a></h3> <pclass="date">August 10, 2011</p> </div> <p>You probably haven't heard of them duis</p> </div> 28 <article> <header> <h1><ahref="">I Scream My Thoughts</a></h1> <time>August 10, 2011</time> </header> <p>You probably haven't heard of them duis</p> </article> Previously HTML5
  • 36. An article is a piece of content that can stand on it’s own 29
  • 37. Date and Time <time datetime={datetime} pubdate>Human Readable String</time> Datetime Date: 2011-09-20 Datetime: 2011-09-20T20:00Z Datetime: 2011-09-20T20:00+00:00 Pubdate Used with article to denote that this particular time is the publication date. 30
  • 38. Date Time 31 Just the letter T 2011-09-20T20:00Z Z for Zulu Time Hours:Minutes Year-Month-Day Just the letter T 2011-09-20T20:00+00:00 Year-Month-Day Hours:Minutes Time Zone Offset
  • 39. Section? 32 There’s also this thing called “<section>” how does that work.
  • 40. An Article is a piece of stand-alone content 33
  • 43. A section is a collection of related pieces of content 36
  • 44. 37
  • 45. Articles can contain Sections 38
  • 46. Blog Post 39 Article Section Section Section
  • 47. Sections can contain Articles 40
  • 48. Articles can contain other articles 41
  • 49. 42 Article Section Section Section Article Article
  • 51. Content <divclass=”content”> <divclass="post”> ... </div> <divclass="post”> ... </div> <divclass="post”> ... </div> </div> 44 <divclass=”content”> <article> ... </article> <article> ... </article> <article> ... <article> </div> Previously HTML5
  • 52. Also can be correct <divclass=”content”> <divclass="post”> ... </div> <divclass="post”> ... </div> <divclass="post”> ... </div> </div> 45 <section class=”content”> <article> ... </article> <article> ... </article> <article> ... <article> </section> Previously HTML5
  • 53. Umm 46 That’s great, but frankly not that much of a different, how is that better?
  • 54. Benefit 1 </div> </div> </div> <div id=“footer”> </div> </body> 47 </div> </article> </div> <footer> </footer> </body> Before these Elements After
  • 55. Benefit 2 Less monkeying with content hierarchies 48
  • 56. 49 Post Page Main Page Archive Page <article> <header> <h1><a href="">I Made a Post Thingie</a></h1> <time datetime="2011-09-02">September 2, 2011</time> </header> <imgsrc="img/captain-awesome.jpg" width="300" height="200" alt="Image of Captain Awesome" /> <p>DIY eanulla photo booth temporoccaecat, velitnihilmixtapescenester. Irony laboris echo park, wolf officia vice cupidatatlabore butcher freegan farm-to-table nisi velitaliqua gluten-free. Aliquipnesciuntassumenda, wayfarers seitan wolf reprehenderitnulla twee sartorial dolore food truck voluptateex vinyl. Aliquip ex enim, irony terry richardson trust fund consectetur fappariatur dolor. Lo-fi nulla whatever mlkshk, banksyamerican apparel carles adipisicingincididunt wolf photo booth hipster. Wayfarers four loko ex cosby sweater, adipisicingsartorial non cardigan craft beer cillumreprehenderit terry richardson 3 wolf moon mollit. Ethical utlabore beard, 3 wolf moon duis readymade assumenda hipster tofu mcsweeney's master cleanse.</p> </article> article header h1 Article Article Article
  • 57. Benefit 3 No longer bound to one header or one navcan have multiple. 50
  • 58. New Elements work across Modern Browsers without Fail 51
  • 60. Use the HTML 5 Shiv 53 http://code.google.com/p/html5shiv/
  • 62.
  • 63. Uses?
  • 66. Perhaps future Search Engine hints.<p data-firstname=“Terry” data-lastname=“Ryan”>Terry Ryan</p>
  • 67. These next things aren’t semantic, just kinda cool 56
  • 68.
  • 69. Uses
  • 71. Comment previews<p contenteditable="true” class="comment">Comment</p>
  • 72.
  • 73. Uses:
  • 74. No one spellchecks anything they post on the web
  • 75. But you will have the moral high ground to point out on your site they could have. <p contenteditable="true" spellcheck="spellcheck" class="comment">Comment</p>
  • 77. HTML5 includes lots of new Input types 60
  • 78. They aren’t supported on every browser 61
  • 79. All browsers default to showing unknown input types as Text 62
  • 80.
  • 81. Browser vendors tend to round, add magnifying glass, etc. <input type=“search” name=“search” />
  • 82.
  • 83. Provides email keyboard on iOS devices.<input type=“email” name=“email” />
  • 84.
  • 85. Provides url keyboard on iOS devices.<input type=“url” name=“url” />
  • 86.
  • 87. Provides a stepper on desktops
  • 91.
  • 92. Not well supported, but have potential 68
  • 93.
  • 94. The slider allows you to pick one
  • 99.
  • 101. Displays a data picker
  • 104. IE
  • 105. Dashes your hopes and dreams the way only IE can<input type=“date” name=“dob” />
  • 107. Output Semantically correct placeholder for calculated values. Can also be used a label for input type=“slider” <output />
  • 108. Output in Action 73 <form class="order"> <label for="quantity">Quantity:</label> <input id="quantity" name="quantity" type="number" value="1" onChange="calc()" /> <br/> <label for="price">Price: </label> <input id="price" name="price" type="number" value="19.99" disabled /> <br/> <label for="total">Total: </label> <output id="total" name="total" /> <br/> </form> <script type="application/javascript"> function calc(){ varquantity = document.getElementById("quantity").value; varprice = document.getElementById("price").value; vartotal = document.getElementById("total"); total.value= Math.round(quantity * price * 100)/100; } </script>
  • 109. meter 74 Basically a Bar Chart of results <meter min=“0” max=“20” value=“12”>12cm</meter>
  • 110. progress 75 Could be used to indicate progress through a multistep form Could be programmatically changed to indicate progress of program <progress min=“100” value=“20”>20%</progress>
  • 112. Remember 10 years ago? 77
  • 113. On Tableless designs 78 Don’t use tables for layout, use CSS. Tables are for tabular data. They are just one of the tools in your toolkit. Holzschlag Shea Icons by: http://www.ngenworks.com/ Zeldman
  • 114. What people heard 79 Don’t use tables for layout, use CSS. Tables are for tabular data. They are just one of the tools in your toolkit. Holzschlag Shea Icons by: http://www.ngenworks.com/ Zeldman
  • 115. I’m not saying 80 Don’t use div’swhen there are semantic elements that make sense. Div’s are stillgood fordenoting thingsthat have no semantic equivalent
  • 116. I’m not saying 81 Don’t use div’s when there are semantic elements that make sense. Div’s are still good for denoting things that have no semantic equivalent
  • 117. You are not requiredto do any of what I just said 82
  • 120. A lot of this stuff is in Flux 85
  • 122. Can you use it? 87
  • 124. The most common browsers have crappy HTML 5 support 89 Source: https://netaverages.adobe.com
  • 125. New Elements Supported on most browsers If they are not supported, can be enabled using the HTML 5 Shiv 90
  • 126. New Attributes Supported on most browsers If they are not supported, they have no impact. 91
  • 127. New Form Inputs Support wildly varies If they are not supported, they have no impact. 92
  • 128. New Form Elements Support wildly varies Mimic things that have been provided by JavaScript for years 93
  • 130. 95
  • 131. Big Question: Why use this stuff?? 96
  • 132. 97 It’s Also about the Annoyed Reader Used to be about the “Blind Billionaire
  • 133. All They Care About is this 98 Content
  • 134. More Content here More Content here More Content here We can tell them 99 Content
  • 135. And increase the understandability of your code 100
  • 136. For Future Reference HTML 5 General http://diveintohtml5.org http://html5doctor.com HTML5 Semantics http://diveintohtml5.org/semantics.html HTML 5 Forms http://wufoo.com/html5 http://diveintohtml5.org/forms.html 101
  • 137. Follow up? Feel free to contact me terry.ryan@adobe.com http://terrenceryan.com Twitter: @tpryan