SlideShare ist ein Scribd-Unternehmen logo
1 von 96
html 5
a gentle introduction
Sorry No APIs today
Just a big tag soup
A Doctype you can
  remember in
    your head
Before:

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
  Transitional//EN" "http://www.w3.org/TR/
  xhtml1/DTD/xhtml1-transitional.dtd">

After

  <!DOCTYPE html>
Cleaner meta

Before

  <meta http-equiv=”content-type”
  content=”text/html” charset=”uft-8”>

after

  <meta charset=”utf-8”> (works now)
Not xml

<meta charset=”utf-8”>
<meta charset=”utf-8” />
<meta CHARset=utf-8 />
<META CHARSET=UTf-8>
It’s all good
HTML5
Transitioning
For the old schoolers

<plaintext> => <pre>

<basefont><big><font><tt> => CSS

<s><strike><u> => CSS text-decoration

<center> => CSS text-align margin:auto

link, alink, vlink and the likes => CSS
Failed html4 markup

 <img longdesc> => gone

 <frameset><frame> => gone (<iframe> stays)

 <html version> => gone

 <meta scheme> => gone (google “invisible metadata”)

 rev attribute => gone rel instead
HTML5 transition:
HTML compatibility

<script type=”text/javascript”> => It’s javascript folks,
no need to specify a type

<style type=”text/css”> => Is there any other type?

<a href=”#”><img border=”0”></a> => border is
staying for the moment, only with a value of 0
HTML5 transition:
XHTML compatibility


Self close empty HTML4 tags:

  <meta /> <link /><br /> etc..

Attribute values are always quoted “” || ‘’
The minimal
requirements HTML5

 <!DOCTYPE html>

 <meta charset=”utf-8”>

 <title>My Page</title>

 <p>any other content</p>
The minimal requirements for
a consistent DOM with XHTML

<!DOCTYPE html>
<html>
   <head>
     <meta charset=”utf-8”>
     <title>My Page</title>
   </head>
   <body>
     <p>any other content</p>
   </body>
 </html>
The minimal requirements for
a consistent DOM with XHTML

<table>
    <tbody>
       <tr>
         <td>....</td>
       </tr>
    </tbody>
 </table>
HTML5 transition:
Update Obsolete Markup
<applet> => why? Really, Why? <embed>
<dir> => <ul>
<acronym> => <abbr>
<blink> => don’t
<marquee> => don’t
<font> => still?
name attribute becomes id ex:
<a name=”faq1”></a> => <div id=” faq1”>...</div>
<img name=”map1”/> => <img id=”map1”/>
HTML5 transition:
    Semantic changes

<em> => You can nest to extra emphasis
<small> => small print, disclaimer, caveats, less
important
<i> => Alternate voice/mood. Idioms, tech term
<br> => line break in poems, addresses
<hr> => thematic break
HTML5 transition:
More Semantic changes

<strong> => Importance rather than emphasis
<b> => stylistically offset text. (keyword, leading
paragraph)
<address> =>is for contact details of the author of
the current article or document not just for postal
address.
HTML5 transition:
     un-deprecated

<iframe> => nested html
<embed> => for plugins (Works today)
target attribute (<base target> <a target> <area
target>)
<li value>
<ol start>
<ol><ul> can now have 0 items
<ol reversed>
HTML5 transition:
         cite
html4 allowed use of cite speaker names
html5 only allows title of a work, disallows people
workaround <cite> + hCard for speakers
<blockquote cite=”#ds”>
    And then I said: let there be light
</blockquote>
<cite class=”vcard”>
    <span class=”fn” id=”ds”>
       Diego Scataglini
    </span>
</cite>
Microsoft WIN
      contenteditable*
contenteditable is now ofïŹcially part of HTML
The DOM attribute is contentEditable
el.contentEditable = [value]
to check
el.isContentEditable

document.designMode = ‘on’ makes the entire
document editable, only by javascript.

*contenteditable works today across browsers
Self explanatory tags

data-* => To pass information to scripts from markup
draggable => no need to explain
hidden => no need to explain
role, aria-* attributes => see WAI-ARIA
spellcheck => boolean to tell the browser to use it or
not
tabindex => now it can have a -1 to skip the element
unsupported tags

<menu>, <command contextmenu> to deïŹne
toolbars and context menus for your application
microdata is a method of marking up elements with
additional machine-readable data.
item, itemprop => key value store passing for
microdata
<style scoped> Scoped tells the browser to apply the
styles only to the wrapping elements and its
children.
HTML5
new elements off the block
We all use these

<div (id|class)=”header”>
<div (id|class) =”nav”>
<div (id|class) =”sidebar”>
<div (id|class) =”article”>
<div (id|class) =”footer”>
<div (id|class) =”content”>
And here is the proof
Now we can use these
<div (id|class)=”header”> => <header>
<div (id|class) =”nav”> => <nav>
<div (id|class) =”sidebar”> => <aside>
<div (id|class) =”article”> => <article>
<div (id|class) =”footer”> => <footer>
What about “content”?
Whatever is not one of: header, nav, footer, aside
is usually the content or you can use WAI-ARIA
and add role=”main” to the wrapping element
CSS Gotch’yer block?

These new elements are all display: inline so if
you want to have them as blocks you need to do
so yerself

header, nav, footer, article {display: block; }
nav {ïŹ‚oat:left; width: 20%; }
article {ïŹ‚oat:right; width: 79%; }
footer {clear: both;}
IE Gotch’yer CSS?
IE will ignore that css goodness and won’t let you
style any of those new tags unless you create them
through javascript like so in the HEAD provided
those elements are inside a body tag:
<script>
document. createElement(‘ header’ );
document. createElement(‘ nav’ ) ;
document. createElement(‘ article’ ) ;
document. createElement(‘ footer’ );
</script>
<Article> for content
         (can have many)
Headers can be used also to specify heading of sections
or articles
<article>
     <div class=”article-header”>
        <h2>My awesome post</h2>
     </div>
     <p>Yeah right</p>
     <div class=”article-meta”>
        Posted in awesomeness
     </meta>
  </article>
<Header> not just for
    Headers?!?
Headers can be used also to specify heading of sections or articles
or anything else. You can have as many headers as you need
  <article>
    <header>
       <h2>My awesome post</h2>
    </header>
    <p>Yeah right</p>
    <div class=”meta”>
       Posted in awesomeness
    </meta>
  </article>
Like-wise for <footer>
Headers can be used also to specify heading of sections
or articles
<article>
     <header>
        <h2>My awesome post</h2>
     </header>
     <p>Yeah right</p>
     <footer>
        Posted in awesomeness
     </footer>
  </article>
Time

If you’re happy with the machine readable* inside the
tags you can omit the datetime attribute:
<time>20:00</time>

 *The spec says “The time element represents either a
 time on a 24-hour clock, or a precise date in the
 proleptic Gregorian calendar, optionally with a time
 and a time-zone of set.”
<Time> [datetime]
Valid formats: YYYY-MM-DD, HH:MM, or full with date
and time and timezone
<article>
    ....
    <footer>
         Posted in awesomeness
         on <time
         datetime=”2010-11-13T12:00:00.001-04:00”>1
         millisecond past midnight</time>
    </footer>
 </article>
<Time> [pubdate]
pubdate is a boolean attribute that indicates the
publication date of an <article> or the whole <body>
content
<article>
    <footer>
       Posted in awesomeness
       on <time
       datetime=”2010-11-13T12:00:00.001-04:00”
       pubdate>1 millisecond past midnight</time>
    </footer>
  </article>
<HGROUP>

<header>
   <a href=”/”><img src=logo.png /></a>
   <hgroup>
     <h1> My awesome blog </h1>
     <h2> Yeah, that’s right, I went there</h2>
   </hgroup>
</header>
Articles for
          comments?
Article can be nested inside of articles and it’s
actually encouraged by the specs “When article
elements are nested, the inner article elements
represent articles that are in principle related to
the contents of the outer article. For instance, a
blog entry on a site that accepts user-submitted
comments could represent the comments as article
elements nested within the article element for the
blog entry.”
<NAV>
<header>
   <a href=”/”><img src=logo.png /></a>
   <nav>
     <ul>
       <li><a href=... </li>
       <li><a href=... </li>
     </ul>
   </nav>
</header>
or <NAV>
<header>
   <a href=”/”><img src=logo.png /></a>
</header>
<nav>
   <ul>
     <li><a href=... </li>
     <li><a href=... </li>
   </ul>
</nav>
or multiple <NAV>s
<header>
    <a href=”/”><img src=logo.png /></a>
    <nav>
      ....
    </nav>
</header>
<aside>
    <nav>
      ....
    </nav>
</aside>
footer <NAV>?


The specs suggests that the “legal” links
and usually footer links not be wrapped
in <nav> but it’s debatable and debated
<ASIDE>
A section of a page that consists of content that is
tangentially related to the content around the aside
element, and which could be considered separate from
that content. Such sections are often represented as
sidebars in printed typography.

The element can be used for typographical effects like
pull quotes or sidebars, for advertising, for groups of
nav elements, and for other content that is considered
separate from the main content of the page.
<DETAILS>
a disclosure widget from which the user can obtain
additional information or controls. (not implemented
yet)

Provides a expanding/collapsing area.
The ïŹrst child should be a <summary> element
followed by ïŹ‚ow elements.

<details open> to make it default to the open state
<FIGURE>
The ïŹgure element represents some ïŹ‚ow content,
optionally with a caption, that is self-contained and is
typically referenced as a single unit from the main ïŹ‚ow of
the document.

<ïŹgure>
   <img src...>
   <ïŹgcaption>
     Diego’s awesome God-like Body
   </ïŹgcaption>
 </ïŹgure>
<MARK>
        The html equivalent of a highlighter.

represents a run of text in one document marked or highlighted for
reference purposes, due to its relevance in another context. When
used in a quotation or other block of text referred to from the prose, it
indicates a highlight that was not originally present but which has
been added to bring the reader's attention to a part of the text that
might not have been considered important by the original author
when the block was originally written, but which is now under
previously unexpected scrutiny.When used in the main prose of a
document, it indicates a part of the document that has been
highlighted due to its likely relevance to the user's current activity.
<RUBY> our favorite
             tag
The ruby element allows one or more spans of phrasing content to be marked
with ruby annotations. Ruby annotations are short runs of text presented
alongside base text, primarily used in East Asian typography as a guide for
pronunciation or to include other annotations. In Japanese, this form of
typography is also known as furigana.

A ruby element represents the spans of phrasing content it contains, ignoring
all the child rt and rp elements and their descendants. Those spans of
phrasing content have associated annotations created using the rt element.
<RUBY> best practices

<ruby>
     <rp>(</rp><rt>         </rt><rp>)</rp>
      <rp>(</rp><rt>        </rt><rp>)</rp>
</ruby>
Non compliant browsers will render     (       )   (   )
NOTE: IE has had these for a very long time.
HTML5
Outlining algorithm
Everything is a
        section
These are sectioning content tags:

<article>

<section>

<nav>

<aside>
WHAT???
Let’s look at the
        outline

<h1>Hello</h1>
<div>               1. Hello
   <h1>world</h1>   2. world
</div>
Now with sectioning


<h1>Hello</h1>
<article>            1. Hello
    <h1>world</h1>      1. world
</article>
Heading values don’t
    mean $#!t

<h6>Hello</h6>
<article>            1. Hello
    <h1>world</h1>      1. world
</article>
Not having a headline
     Still counts

<h6>Hello</h6>
<article>          1. Hello
    <p>world</p>      1. Untitled
</article>               Section
Sometimes legitimate

For <nav> and <aside> is perfectly legitimate
to not have a heading.
It’ll still come up as “untitled section” though

Check your outline @
http://gsnedders.html5.org/outliner/
Hgroup are Highlanders
   “there can be only one”

<h6>Hello</h6>
<article>
    <hgroup>
      <h6>Cruel</h6>         1. Hello
      <h1>World</h1>            1. World
    </hgroup>        Highest heading
</article>
                         value wins
Sectioning Roots




<blockquote>   <ïŹeldset>   Can have their own
<body>         <ïŹgure>     outline but don’t
<details>      <td>        contribute to ancestors’
                           outlines
Sectioning Roots

<h6>Hello</h6>
<article>
    <h1>world</h1>
    <blockquote>        1. Hello
      <h1>Sucka!</h1>      1. world
    </blockquote>
</article>
Article vs Section

Articles are self
contained pieces of
content that can be    Sections are not!
redistributed and be
ïŹne.
Article vs Section


An article can have many sections just as well as a
page can have many sections which wrap many
articles.
HTML5
me love forms long time
MOM look at me,
       I am outside a form


<form id=”foo”>
      <select>
        ...
      </select>
</form>
.....
<input type=”submit” form=”foo">
Input types goodness

<input type=”text” >
<input type=”email” required multiple> => comma
separated emails
<input type=”url”>
<input type=”date|time|datetime|month|week”>
<input type=”number” min=”0” max=”100”
step=”5”>
<input type=”range”>
<input type=”search”>
<input type=”tel”>
<input type=”color”>
Attribute goodness


autocomplete*, min, max, step, multiple, required,
pattern, list, autofocus, placeholder

Step can also take “any” (any accuracy)

Most of them do what you expect them to.
list is a separate interesting beast by itself

*works today
list & <DATALIST>

<datalist> is like an editable <select>. It let users type
their own value if none of available choices pleases
them. Referenced by ID in the list attribute.
<input name=phone-type type=text list=location />
<datalist id=”location”>
    <option label=”home” value=”h”>
    <option label=”work” value=”w”>
    <option label=”mobile” value=”m” >
</datalist>
HTML5
the media whore
<VIDEO>

<video src=myvideo.ogv></video>

With fallback now for older browsers

<video src=myvideo.ogv>
Download <a href=myvideo.ogv>my video</a>
</video>
<VIDEO> attributes


controls => tells the browser to provide controls
poster => URL to an image to show while
downloading
height, width, autoplay, preload => exactly as expected
seize the <VIDEO>

<video> will always respect the aspect ratio of the
resource even if you specify it wrong. It’ll be rendered
“letter-boxed”.
In absence of width attribute, the width will be
calculated from the poster frame size. If the poster
attribute is missing it’ll fall back on the video resource,
otherwise it’s 300px.
preload the <VIDEO>


preload=auto or just preload
preload=none
preload=metadata
different <VIDEO>
for different strokes

<video controls>
    <source src=”my-super-hi-res-video.mp4”
          media=”(min-device-width:1280px)”>
    <source src=shitty-low-res.mp4>
</video>
The downfall of
   <VIDEO>
No DRM, for DRM restriction use plugins
No standard codec so provide them all

<video controls>
<source src=video.ogv
     type=’video/ogg codecs=”theora, vorbis”’>
<source src=video.mp4
     type=’video/mp4 codecs=”avc1.42E01E, mp4a.40.2”’>
<!-- fallback -->
<p>Please download the video in <a
href=”video.ogv”>Ogg</a> or <a href=”video.mp4”>
format.</p>
</video>
falling
                                 even lower
                                   <VIDEO>
<video controls>
<source src=video.ogv type=’video/ogg codecs=”theora, vorbis”’>
<source src=video.mp4 type=’video/mp4 codecs=”avc1.42E01E, mp4a.
40.2”’>
<embed src=”video.swf” type=”application/x-shockwave-ïŹ‚ash”
allowscriptaccess=”always” allowfullscreen=”true” width=”320”
height=”240”>
</video>
Customizing
              <VIDEO>
<video controls id=”cool” src=cool.ogv></video>
...
var video = document. getElementsByTagName(‘ video’ )[0] ;
video.removeAttribute(‘ controls’ ) ;
/* now you have access to
video.paused, video.ended, video.currentTime, video.play(),
video.pause() and more */
<AUDIO>


Pretty much the same usage as video
<AUDIO|VIDEO>
 format support
 (don’t hold your breath)




 Trident 5.0 is IE9 engine
What’s next
all the stuff I didn’t have time
      to create slides for
The cool stuff
Canvas
Data Storage
   Web Storage - key value store supported in latest browsers
      http://dev.w3.org/html5/webstorage/    (works today)

   Web SQL Database - Opera, Chrome, Safari
      http://dev.w3.org/html5/webdatabase/
OfïŹ‚ine browsing - http://www.w3.org/TR/ofïŹ‚ine-webapps/
Drag & Drop - http://dev.w3.org/html5/spec/dnd.html
GeoLocation - http://dev.w3.org/geo/api/spec-source.html
Cross-document messaging - Works ~everywhere: safari, chrome coming
Workers and WebSockets
even cooler stuff
bleeding edge or (vaporware)



microdata - http://dev.w3.org/html5/md/

HTML Device - http://dev.w3.org/html5/html-device/
What does my
browser support?
Let’s put things in perspective
Firefox 3.6
Firefox 3.6
Firefox 3.6
Firefox 3.6
Chrome 6
Chrome 6
Chrome 6
Chrome 6
IE8
IE8
IE8
IE8
What about IE9?

IE9 will bring good support for canvas, at par
with everybody else

Media support will be pretty good, work needs
to be done.

Nothing yet on the form elements, new tags
and attributes.
Thanks
        Diego Scataglini
http://www.diegoscataglini.com

Weitere Àhnliche Inhalte

Was ist angesagt?

Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Terry Ryan
 
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete ReferenceEPAM Systems
 
The complete-html-cheat-sheet
The complete-html-cheat-sheetThe complete-html-cheat-sheet
The complete-html-cheat-sheetHARUN PEHLIVAN
 
html for beginners
html for beginnershtml for beginners
html for beginnersKIIZAPHILIP
 
If you know nothing about HTML, this is where you can start !!
If you know nothing about HTML, this is where you can start !!If you know nothing about HTML, this is where you can start !!
If you know nothing about HTML, this is where you can start !!Dr Sukhpal Singh Gill
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Gil Fink
 
A quick guide to Css and java script
A quick guide to Css and  java scriptA quick guide to Css and  java script
A quick guide to Css and java scriptAVINASH KUMAR
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5www.netgains.org
 
Html Workshop
Html WorkshopHtml Workshop
Html Workshopvardanyan99
 
Templates
TemplatesTemplates
Templatessoon
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationSean Burgess
 
Learn html elements and structure cheatsheet codecademy
Learn html  elements and structure cheatsheet   codecademyLearn html  elements and structure cheatsheet   codecademy
Learn html elements and structure cheatsheet codecademynirmalamanjunath
 
HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examplesAlfredo Torre
 
Caracteristicas Basicas De Htlm
Caracteristicas Basicas De HtlmCaracteristicas Basicas De Htlm
Caracteristicas Basicas De HtlmMaria S Rivera
 
1. introduction to html5
1. introduction to html51. introduction to html5
1. introduction to html5JayjZens
 
Html 5 New Features
Html 5 New FeaturesHtml 5 New Features
Html 5 New FeaturesAta Ebrahimi
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookScottperrone
 

Was ist angesagt? (20)

Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
HTML 5 Complete Reference
HTML 5 Complete ReferenceHTML 5 Complete Reference
HTML 5 Complete Reference
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
The complete-html-cheat-sheet
The complete-html-cheat-sheetThe complete-html-cheat-sheet
The complete-html-cheat-sheet
 
html for beginners
html for beginnershtml for beginners
html for beginners
 
If you know nothing about HTML, this is where you can start !!
If you know nothing about HTML, this is where you can start !!If you know nothing about HTML, this is where you can start !!
If you know nothing about HTML, this is where you can start !!
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
A quick guide to Css and java script
A quick guide to Css and  java scriptA quick guide to Css and  java script
A quick guide to Css and java script
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
 
Templates
TemplatesTemplates
Templates
 
Sightly - Part 2
Sightly - Part 2Sightly - Part 2
Sightly - Part 2
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
 
Learn html elements and structure cheatsheet codecademy
Learn html  elements and structure cheatsheet   codecademyLearn html  elements and structure cheatsheet   codecademy
Learn html elements and structure cheatsheet codecademy
 
HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examples
 
Caracteristicas Basicas De Htlm
Caracteristicas Basicas De HtlmCaracteristicas Basicas De Htlm
Caracteristicas Basicas De Htlm
 
Css, xhtml, javascript
Css, xhtml, javascriptCss, xhtml, javascript
Css, xhtml, javascript
 
1. introduction to html5
1. introduction to html51. introduction to html5
1. introduction to html5
 
Html 5 New Features
Html 5 New FeaturesHtml 5 New Features
Html 5 New Features
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - Ebook
 

Andere mochten auch

For The Ladies
For The LadiesFor The Ladies
For The LadiesAN7ONYO
 
éŠ™æžŻć…­ćˆćœ©
éŠ™æžŻć…­ćˆćœ©éŠ™æžŻć…­ćˆćœ©
éŠ™æžŻć…­ćˆćœ©huojian
 
Edu 5818 tugasan 1 instructional supervision
Edu 5818 tugasan 1 instructional supervisionEdu 5818 tugasan 1 instructional supervision
Edu 5818 tugasan 1 instructional supervisionIndra Maniam
 
Presentation2
Presentation2Presentation2
Presentation2Jim
 
Centre Oscar Lambret - Winscribe Microsoft Case Study
Centre Oscar Lambret - Winscribe Microsoft Case StudyCentre Oscar Lambret - Winscribe Microsoft Case Study
Centre Oscar Lambret - Winscribe Microsoft Case Studyfrankenbox
 
Creativity in the language classroom with Animoto
Creativity in the language classroom with AnimotoCreativity in the language classroom with Animoto
Creativity in the language classroom with Animotomickstout
 
Aug 16 workshop backgrounder final
Aug 16 workshop backgrounder finalAug 16 workshop backgrounder final
Aug 16 workshop backgrounder finalNeeraj Mahajan
 
Remy Poupot / Plenary Session Emergence Forum Barcelona
Remy Poupot / Plenary Session Emergence Forum BarcelonaRemy Poupot / Plenary Session Emergence Forum Barcelona
Remy Poupot / Plenary Session Emergence Forum BarcelonaBiocat, BioRegion of Catalonia
 
Mock exam animals
Mock exam animalsMock exam animals
Mock exam animalsolgacenteno84
 
Jorge Cortell / Personalized medicine. HERE. NOW
Jorge Cortell / Personalized medicine. HERE. NOWJorge Cortell / Personalized medicine. HERE. NOW
Jorge Cortell / Personalized medicine. HERE. NOWBiocat, BioRegion of Catalonia
 

Andere mochten auch (20)

For The Ladies
For The LadiesFor The Ladies
For The Ladies
 
Hadeeth11
Hadeeth11Hadeeth11
Hadeeth11
 
The Many Facets of IPL Community Building
The Many Facets of IPL Community BuildingThe Many Facets of IPL Community Building
The Many Facets of IPL Community Building
 
Core3 teamwork
Core3 teamworkCore3 teamwork
Core3 teamwork
 
Pictures
PicturesPictures
Pictures
 
Tatto
TattoTatto
Tatto
 
éŠ™æžŻć…­ćˆćœ©
éŠ™æžŻć…­ćˆćœ©éŠ™æžŻć…­ćˆćœ©
éŠ™æžŻć…­ćˆćœ©
 
Edu 5818 tugasan 1 instructional supervision
Edu 5818 tugasan 1 instructional supervisionEdu 5818 tugasan 1 instructional supervision
Edu 5818 tugasan 1 instructional supervision
 
X Te
X TeX Te
X Te
 
Presentation2
Presentation2Presentation2
Presentation2
 
Alcipid
AlcipidAlcipid
Alcipid
 
Centre Oscar Lambret - Winscribe Microsoft Case Study
Centre Oscar Lambret - Winscribe Microsoft Case StudyCentre Oscar Lambret - Winscribe Microsoft Case Study
Centre Oscar Lambret - Winscribe Microsoft Case Study
 
Info warrior
Info warriorInfo warrior
Info warrior
 
Creativity in the language classroom with Animoto
Creativity in the language classroom with AnimotoCreativity in the language classroom with Animoto
Creativity in the language classroom with Animoto
 
Aug 16 workshop backgrounder final
Aug 16 workshop backgrounder finalAug 16 workshop backgrounder final
Aug 16 workshop backgrounder final
 
Remy Poupot / Plenary Session Emergence Forum Barcelona
Remy Poupot / Plenary Session Emergence Forum BarcelonaRemy Poupot / Plenary Session Emergence Forum Barcelona
Remy Poupot / Plenary Session Emergence Forum Barcelona
 
Mock exam animals
Mock exam animalsMock exam animals
Mock exam animals
 
Jorge Cortell / Personalized medicine. HERE. NOW
Jorge Cortell / Personalized medicine. HERE. NOWJorge Cortell / Personalized medicine. HERE. NOW
Jorge Cortell / Personalized medicine. HERE. NOW
 
Media audit1
Media audit1Media audit1
Media audit1
 
Coaching Counselling
Coaching CounsellingCoaching Counselling
Coaching Counselling
 

Ähnlich wie Html5, a gentle introduction

46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello worldhemi46h
 
Introduction to HTML.pptx
Introduction to HTML.pptxIntroduction to HTML.pptx
Introduction to HTML.pptxmalrad1
 
HTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeHTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeMichael Sturgeon
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)Ahsan Rahim
 
HTML5 tags.ppt
HTML5 tags.pptHTML5 tags.ppt
HTML5 tags.pptabcxyz1337
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web DevelopmentRahul Mishra
 
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]Aaron Gustafson
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Getting started with html5
Getting started with html5Getting started with html5
Getting started with html5Suresh Kumar
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateInventis Web Architects
 
3 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp023 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp02Aditya Varma
 
Hf html-cheat-sheet
Hf html-cheat-sheetHf html-cheat-sheet
Hf html-cheat-sheetHARUN PEHLIVAN
 
Front end full stack development module 1pptx
Front end full stack development module 1pptxFront end full stack development module 1pptx
Front end full stack development module 1pptxMaruthiPrasad96
 

Ähnlich wie Html5, a gentle introduction (20)

46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world
 
Introduction to HTML.pptx
Introduction to HTML.pptxIntroduction to HTML.pptx
Introduction to HTML.pptx
 
HTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeHTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the Code
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
HTML5 tags.ppt
HTML5 tags.pptHTML5 tags.ppt
HTML5 tags.ppt
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
 
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]
 
Html 5
Html 5Html 5
Html 5
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Html5 semantics
Html5 semanticsHtml5 semantics
Html5 semantics
 
Training HTML
Training HTMLTraining HTML
Training HTML
 
Getting started with html5
Getting started with html5Getting started with html5
Getting started with html5
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-template
 
3 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp023 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp02
 
Html5 css3
Html5 css3Html5 css3
Html5 css3
 
Html
HtmlHtml
Html
 
Hf html-cheat-sheet
Hf html-cheat-sheetHf html-cheat-sheet
Hf html-cheat-sheet
 
Front end full stack development module 1pptx
Front end full stack development module 1pptxFront end full stack development module 1pptx
Front end full stack development module 1pptx
 
HTML5 introduction
HTML5 introductionHTML5 introduction
HTML5 introduction
 
Html
HtmlHtml
Html
 

KĂŒrzlich hochgeladen

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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 TerraformAndrey Devyatkin
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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.pdfsudhanshuwaghmare1
 
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...DianaGray10
 
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 StrategiesBoston Institute of Analytics
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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 WorkerThousandEyes
 

KĂŒrzlich hochgeladen (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
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...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 

Html5, a gentle introduction

  • 1. html 5 a gentle introduction
  • 3. Just a big tag soup
  • 4. A Doctype you can remember in your head Before: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/ xhtml1/DTD/xhtml1-transitional.dtd"> After <!DOCTYPE html>
  • 5. Cleaner meta Before <meta http-equiv=”content-type” content=”text/html” charset=”uft-8”> after <meta charset=”utf-8”> (works now)
  • 6. Not xml <meta charset=”utf-8”> <meta charset=”utf-8” /> <meta CHARset=utf-8 /> <META CHARSET=UTf-8> It’s all good
  • 8. For the old schoolers <plaintext> => <pre> <basefont><big><font><tt> => CSS <s><strike><u> => CSS text-decoration <center> => CSS text-align margin:auto link, alink, vlink and the likes => CSS
  • 9. Failed html4 markup <img longdesc> => gone <frameset><frame> => gone (<iframe> stays) <html version> => gone <meta scheme> => gone (google “invisible metadata”) rev attribute => gone rel instead
  • 10. HTML5 transition: HTML compatibility <script type=”text/javascript”> => It’s javascript folks, no need to specify a type <style type=”text/css”> => Is there any other type? <a href=”#”><img border=”0”></a> => border is staying for the moment, only with a value of 0
  • 11. HTML5 transition: XHTML compatibility Self close empty HTML4 tags: <meta /> <link /><br /> etc.. Attribute values are always quoted “” || ‘’
  • 12. The minimal requirements HTML5 <!DOCTYPE html> <meta charset=”utf-8”> <title>My Page</title> <p>any other content</p>
  • 13. The minimal requirements for a consistent DOM with XHTML <!DOCTYPE html> <html> <head> <meta charset=”utf-8”> <title>My Page</title> </head> <body> <p>any other content</p> </body> </html>
  • 14. The minimal requirements for a consistent DOM with XHTML <table> <tbody> <tr> <td>....</td> </tr> </tbody> </table>
  • 15. HTML5 transition: Update Obsolete Markup <applet> => why? Really, Why? <embed> <dir> => <ul> <acronym> => <abbr> <blink> => don’t <marquee> => don’t <font> => still? name attribute becomes id ex: <a name=”faq1”></a> => <div id=” faq1”>...</div> <img name=”map1”/> => <img id=”map1”/>
  • 16. HTML5 transition: Semantic changes <em> => You can nest to extra emphasis <small> => small print, disclaimer, caveats, less important <i> => Alternate voice/mood. Idioms, tech term <br> => line break in poems, addresses <hr> => thematic break
  • 17. HTML5 transition: More Semantic changes <strong> => Importance rather than emphasis <b> => stylistically offset text. (keyword, leading paragraph) <address> =>is for contact details of the author of the current article or document not just for postal address.
  • 18. HTML5 transition: un-deprecated <iframe> => nested html <embed> => for plugins (Works today) target attribute (<base target> <a target> <area target>) <li value> <ol start> <ol><ul> can now have 0 items <ol reversed>
  • 19. HTML5 transition: cite html4 allowed use of cite speaker names html5 only allows title of a work, disallows people workaround <cite> + hCard for speakers <blockquote cite=”#ds”> And then I said: let there be light </blockquote> <cite class=”vcard”> <span class=”fn” id=”ds”> Diego Scataglini </span> </cite>
  • 20. Microsoft WIN contenteditable* contenteditable is now ofïŹcially part of HTML The DOM attribute is contentEditable el.contentEditable = [value] to check el.isContentEditable document.designMode = ‘on’ makes the entire document editable, only by javascript. *contenteditable works today across browsers
  • 21. Self explanatory tags data-* => To pass information to scripts from markup draggable => no need to explain hidden => no need to explain role, aria-* attributes => see WAI-ARIA spellcheck => boolean to tell the browser to use it or not tabindex => now it can have a -1 to skip the element
  • 22. unsupported tags <menu>, <command contextmenu> to deïŹne toolbars and context menus for your application microdata is a method of marking up elements with additional machine-readable data. item, itemprop => key value store passing for microdata <style scoped> Scoped tells the browser to apply the styles only to the wrapping elements and its children.
  • 24. We all use these <div (id|class)=”header”> <div (id|class) =”nav”> <div (id|class) =”sidebar”> <div (id|class) =”article”> <div (id|class) =”footer”> <div (id|class) =”content”>
  • 25. And here is the proof
  • 26. Now we can use these <div (id|class)=”header”> => <header> <div (id|class) =”nav”> => <nav> <div (id|class) =”sidebar”> => <aside> <div (id|class) =”article”> => <article> <div (id|class) =”footer”> => <footer> What about “content”? Whatever is not one of: header, nav, footer, aside is usually the content or you can use WAI-ARIA and add role=”main” to the wrapping element
  • 27. CSS Gotch’yer block? These new elements are all display: inline so if you want to have them as blocks you need to do so yerself header, nav, footer, article {display: block; } nav {ïŹ‚oat:left; width: 20%; } article {ïŹ‚oat:right; width: 79%; } footer {clear: both;}
  • 28. IE Gotch’yer CSS? IE will ignore that css goodness and won’t let you style any of those new tags unless you create them through javascript like so in the HEAD provided those elements are inside a body tag: <script> document. createElement(‘ header’ ); document. createElement(‘ nav’ ) ; document. createElement(‘ article’ ) ; document. createElement(‘ footer’ ); </script>
  • 29. <Article> for content (can have many) Headers can be used also to specify heading of sections or articles <article> <div class=”article-header”> <h2>My awesome post</h2> </div> <p>Yeah right</p> <div class=”article-meta”> Posted in awesomeness </meta> </article>
  • 30. <Header> not just for Headers?!? Headers can be used also to specify heading of sections or articles or anything else. You can have as many headers as you need <article> <header> <h2>My awesome post</h2> </header> <p>Yeah right</p> <div class=”meta”> Posted in awesomeness </meta> </article>
  • 31. Like-wise for <footer> Headers can be used also to specify heading of sections or articles <article> <header> <h2>My awesome post</h2> </header> <p>Yeah right</p> <footer> Posted in awesomeness </footer> </article>
  • 32. Time If you’re happy with the machine readable* inside the tags you can omit the datetime attribute: <time>20:00</time> *The spec says “The time element represents either a time on a 24-hour clock, or a precise date in the proleptic Gregorian calendar, optionally with a time and a time-zone of set.”
  • 33. <Time> [datetime] Valid formats: YYYY-MM-DD, HH:MM, or full with date and time and timezone <article> .... <footer> Posted in awesomeness on <time datetime=”2010-11-13T12:00:00.001-04:00”>1 millisecond past midnight</time> </footer> </article>
  • 34. <Time> [pubdate] pubdate is a boolean attribute that indicates the publication date of an <article> or the whole <body> content <article> <footer> Posted in awesomeness on <time datetime=”2010-11-13T12:00:00.001-04:00” pubdate>1 millisecond past midnight</time> </footer> </article>
  • 35. <HGROUP> <header> <a href=”/”><img src=logo.png /></a> <hgroup> <h1> My awesome blog </h1> <h2> Yeah, that’s right, I went there</h2> </hgroup> </header>
  • 36. Articles for comments? Article can be nested inside of articles and it’s actually encouraged by the specs “When article elements are nested, the inner article elements represent articles that are in principle related to the contents of the outer article. For instance, a blog entry on a site that accepts user-submitted comments could represent the comments as article elements nested within the article element for the blog entry.”
  • 37. <NAV> <header> <a href=”/”><img src=logo.png /></a> <nav> <ul> <li><a href=... </li> <li><a href=... </li> </ul> </nav> </header>
  • 38. or <NAV> <header> <a href=”/”><img src=logo.png /></a> </header> <nav> <ul> <li><a href=... </li> <li><a href=... </li> </ul> </nav>
  • 39. or multiple <NAV>s <header> <a href=”/”><img src=logo.png /></a> <nav> .... </nav> </header> <aside> <nav> .... </nav> </aside>
  • 40. footer <NAV>? The specs suggests that the “legal” links and usually footer links not be wrapped in <nav> but it’s debatable and debated
  • 41. <ASIDE> A section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography. The element can be used for typographical effects like pull quotes or sidebars, for advertising, for groups of nav elements, and for other content that is considered separate from the main content of the page.
  • 42. <DETAILS> a disclosure widget from which the user can obtain additional information or controls. (not implemented yet) Provides a expanding/collapsing area. The ïŹrst child should be a <summary> element followed by ïŹ‚ow elements. <details open> to make it default to the open state
  • 43. <FIGURE> The ïŹgure element represents some ïŹ‚ow content, optionally with a caption, that is self-contained and is typically referenced as a single unit from the main ïŹ‚ow of the document. <ïŹgure> <img src...> <ïŹgcaption> Diego’s awesome God-like Body </ïŹgcaption> </ïŹgure>
  • 44. <MARK> The html equivalent of a highlighter. represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. When used in a quotation or other block of text referred to from the prose, it indicates a highlight that was not originally present but which has been added to bring the reader's attention to a part of the text that might not have been considered important by the original author when the block was originally written, but which is now under previously unexpected scrutiny.When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its likely relevance to the user's current activity.
  • 45. <RUBY> our favorite tag The ruby element allows one or more spans of phrasing content to be marked with ruby annotations. Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronunciation or to include other annotations. In Japanese, this form of typography is also known as furigana. A ruby element represents the spans of phrasing content it contains, ignoring all the child rt and rp elements and their descendants. Those spans of phrasing content have associated annotations created using the rt element.
  • 46. <RUBY> best practices <ruby> <rp>(</rp><rt> </rt><rp>)</rp> <rp>(</rp><rt> </rt><rp>)</rp> </ruby> Non compliant browsers will render ( ) ( ) NOTE: IE has had these for a very long time.
  • 48. Everything is a section These are sectioning content tags: <article> <section> <nav> <aside>
  • 50. Let’s look at the outline <h1>Hello</h1> <div> 1. Hello <h1>world</h1> 2. world </div>
  • 51. Now with sectioning <h1>Hello</h1> <article> 1. Hello <h1>world</h1> 1. world </article>
  • 52. Heading values don’t mean $#!t <h6>Hello</h6> <article> 1. Hello <h1>world</h1> 1. world </article>
  • 53. Not having a headline Still counts <h6>Hello</h6> <article> 1. Hello <p>world</p> 1. Untitled </article> Section
  • 54. Sometimes legitimate For <nav> and <aside> is perfectly legitimate to not have a heading. It’ll still come up as “untitled section” though Check your outline @ http://gsnedders.html5.org/outliner/
  • 55. Hgroup are Highlanders “there can be only one” <h6>Hello</h6> <article> <hgroup> <h6>Cruel</h6> 1. Hello <h1>World</h1> 1. World </hgroup> Highest heading </article> value wins
  • 56. Sectioning Roots <blockquote> <ïŹeldset> Can have their own <body> <ïŹgure> outline but don’t <details> <td> contribute to ancestors’ outlines
  • 57. Sectioning Roots <h6>Hello</h6> <article> <h1>world</h1> <blockquote> 1. Hello <h1>Sucka!</h1> 1. world </blockquote> </article>
  • 58. Article vs Section Articles are self contained pieces of content that can be Sections are not! redistributed and be ïŹne.
  • 59. Article vs Section An article can have many sections just as well as a page can have many sections which wrap many articles.
  • 60. HTML5 me love forms long time
  • 61. MOM look at me, I am outside a form <form id=”foo”> <select> ... </select> </form> ..... <input type=”submit” form=”foo">
  • 62. Input types goodness <input type=”text” > <input type=”email” required multiple> => comma separated emails <input type=”url”> <input type=”date|time|datetime|month|week”> <input type=”number” min=”0” max=”100” step=”5”> <input type=”range”> <input type=”search”> <input type=”tel”> <input type=”color”>
  • 63. Attribute goodness autocomplete*, min, max, step, multiple, required, pattern, list, autofocus, placeholder Step can also take “any” (any accuracy) Most of them do what you expect them to. list is a separate interesting beast by itself *works today
  • 64. list & <DATALIST> <datalist> is like an editable <select>. It let users type their own value if none of available choices pleases them. Referenced by ID in the list attribute. <input name=phone-type type=text list=location /> <datalist id=”location”> <option label=”home” value=”h”> <option label=”work” value=”w”> <option label=”mobile” value=”m” > </datalist>
  • 66. <VIDEO> <video src=myvideo.ogv></video> With fallback now for older browsers <video src=myvideo.ogv> Download <a href=myvideo.ogv>my video</a> </video>
  • 67. <VIDEO> attributes controls => tells the browser to provide controls poster => URL to an image to show while downloading height, width, autoplay, preload => exactly as expected
  • 68. seize the <VIDEO> <video> will always respect the aspect ratio of the resource even if you specify it wrong. It’ll be rendered “letter-boxed”. In absence of width attribute, the width will be calculated from the poster frame size. If the poster attribute is missing it’ll fall back on the video resource, otherwise it’s 300px.
  • 69. preload the <VIDEO> preload=auto or just preload preload=none preload=metadata
  • 70. different <VIDEO> for different strokes <video controls> <source src=”my-super-hi-res-video.mp4” media=”(min-device-width:1280px)”> <source src=shitty-low-res.mp4> </video>
  • 71. The downfall of <VIDEO>
  • 72. No DRM, for DRM restriction use plugins No standard codec so provide them all <video controls> <source src=video.ogv type=’video/ogg codecs=”theora, vorbis”’> <source src=video.mp4 type=’video/mp4 codecs=”avc1.42E01E, mp4a.40.2”’> <!-- fallback --> <p>Please download the video in <a href=”video.ogv”>Ogg</a> or <a href=”video.mp4”> format.</p> </video>
  • 73. falling even lower <VIDEO> <video controls> <source src=video.ogv type=’video/ogg codecs=”theora, vorbis”’> <source src=video.mp4 type=’video/mp4 codecs=”avc1.42E01E, mp4a. 40.2”’> <embed src=”video.swf” type=”application/x-shockwave-ïŹ‚ash” allowscriptaccess=”always” allowfullscreen=”true” width=”320” height=”240”> </video>
  • 74. Customizing <VIDEO> <video controls id=”cool” src=cool.ogv></video> ... var video = document. getElementsByTagName(‘ video’ )[0] ; video.removeAttribute(‘ controls’ ) ; /* now you have access to video.paused, video.ended, video.currentTime, video.play(), video.pause() and more */
  • 75. <AUDIO> Pretty much the same usage as video
  • 76. <AUDIO|VIDEO> format support (don’t hold your breath) Trident 5.0 is IE9 engine
  • 77. What’s next all the stuff I didn’t have time to create slides for
  • 78. The cool stuff Canvas Data Storage Web Storage - key value store supported in latest browsers http://dev.w3.org/html5/webstorage/ (works today) Web SQL Database - Opera, Chrome, Safari http://dev.w3.org/html5/webdatabase/ OfïŹ‚ine browsing - http://www.w3.org/TR/ofïŹ‚ine-webapps/ Drag & Drop - http://dev.w3.org/html5/spec/dnd.html GeoLocation - http://dev.w3.org/geo/api/spec-source.html Cross-document messaging - Works ~everywhere: safari, chrome coming Workers and WebSockets
  • 79. even cooler stuff bleeding edge or (vaporware) microdata - http://dev.w3.org/html5/md/ HTML Device - http://dev.w3.org/html5/html-device/
  • 80. What does my browser support? Let’s put things in perspective
  • 81.
  • 82.
  • 91. IE8
  • 92. IE8
  • 93. IE8
  • 94. IE8
  • 95. What about IE9? IE9 will bring good support for canvas, at par with everybody else Media support will be pretty good, work needs to be done. Nothing yet on the form elements, new tags and attributes.
  • 96. Thanks Diego Scataglini http://www.diegoscataglini.com

Hinweis der Redaktion