Skip to content

Commit

Permalink
Revert "Revert "Revert "diveintomark#20"""
Browse files Browse the repository at this point in the history
This reverts commit 780b5b0.
  • Loading branch information
Kenneth Reitz committed Mar 22, 2012
1 parent 780b5b0 commit 19a1dde
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion detect.html
Expand Up @@ -572,7 +572,7 @@ <h2 id=further-reading>Further Reading</h2>
<li><a href=http://camendesign.com/code/video_for_everybody>Video for Everybody!</a>
<li><a href=http://diveintomark.org/tag/give>A gentle introduction to video encoding</a>
<li><a href=http://wiki.whatwg.org/wiki/Video_type_parameters>Video type parameters</a>
<li><a href=everything.html>The All-In-One Almost-Alphabetical Guide to Detecting Everything</a>
<li><a href=everything.html>The All-In-One Almost-Alphabetical No-Bullshit Guide to Detecting Everything</a>
<li><a href=http://msdn.microsoft.com/en-us/ie/ff468705.aspx>Internet Explorer 9 Guide for Developers</a>
</ul>

Expand Down
6 changes: 3 additions & 3 deletions everything.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>The All-In-One Almost-Alphabetical Guide to Detecting Everything - Dive Into HTML5</title>
<title>The All-In-One Almost-Alphabetical No-Bullshit Guide to Detecting Everything - Dive Into HTML5</title>
<!--[if lt IE 9]><script src=j/html5.js></script><![endif]-->
<link rel=alternate type=application/atom+xml href=https://github.com/diveintomark/diveintohtml5/commits/master.atom>
<link rel=stylesheet href=screen.css>
Expand All @@ -14,7 +14,7 @@
<link rel=stylesheet media='only screen and (max-device-width: 480px)' href=mobile.css>
<link rel=prefetch href=detect.html>
<p>You are here: <a href=index.html>Home</a> <span class=u>&#8227;</span> <a href=table-of-contents.html#everything>Dive Into <abbr>HTML5</abbr></a> <span class=u>&#8227;</span>
<h1><br>The All-In-One<br>Almost-Alphabetical<br>Guide to<br>Detecting Everything</h1>
<h1><br>The All-In-One<br>Almost-Alphabetical<br>No-Bullshit Guide to<br>Detecting Everything</h1>
<p class=a>&#x2767;

<p>(Confused? Read <a href=detect.html>Detecting <abbr>HTML5</abbr> Features</a> for a conceptual introduction. Want an all-in-one library instead? Try <a href=http://modernizr.com/>Modernizr</a>.)
Expand Down Expand Up @@ -277,7 +277,7 @@ <h2 id=further-reading>Further Reading</h2>

<p class=a>&#x2767;

<p>This has been &#8220;The All-In-One Almost-Alphabetical Guide to Detecting Everything.&#8221; The <a href=table-of-contents.html>full table of contents</a> has more if you&#8217;d like to keep reading.
<p>This has been &#8220;The All-In-One Almost-Alphabetical No-Bullshit Guide to Detecting Everything.&#8221; The <a href=table-of-contents.html>full table of contents</a> has more if you&#8217;d like to keep reading.

<div class=pf>
<h4>Did You Know?</h4>
Expand Down
6 changes: 3 additions & 3 deletions extensibility.html
Expand Up @@ -30,7 +30,7 @@ <h2 id=divingin>Diving In</h2>

<p class=f><img src=i/aoc-t.png alt=T width=107 height=105>here are <a href=http://simon.html5.org/html5-elements>over 100 elements</a> in <abbr>HTML5</abbr>. Some are <a href=semantics.html>purely semantic</a>, others are <a href=canvas.html>just containers for scripted <abbr>APIs</abbr></a>. Throughout <a href=past.html>the history of <abbr>HTML</abbr></a>, standards wonks have argued about which elements should be included in the language. Should <abbr>HTML</abbr> include a <code>&lt;figure></code> element? A <code>&lt;person></code> element? How about a <code>&lt;rant></code> element? Decisions are made, specs are written, authors author, implementors implement, and the web lurches ever forward.

<p>Of course, <abbr>HTML</abbr> can&#8217;t please everyone. No standard can. Some ideas don&#8217;t make the cut. For example, there is no <code>&lt;person></code> element in <abbr>HTML5</abbr>. (There&#8217;s no <code>&lt;rant></code> element either) There&#8217;s nothing stopping you from including a <code>&lt;person></code> element in a web page, but <a href=http://html5.validator.nu/>it won&#8217;t validate</a>, <a href=semantics.html#unknown-elements>it won&#8217;t work consistently across browsers</a>, and it might conflict with future <abbr>HTML</abbr> specs if we want to add it later.
<p>Of course, <abbr>HTML</abbr> can&#8217;t please everyone. No standard can. Some ideas don&#8217;t make the cut. For example, there is no <code>&lt;person></code> element in <abbr>HTML5</abbr>. (There&#8217;s no <code>&lt;rant></code> element either, damn it!) There&#8217;s nothing stopping you from including a <code>&lt;person></code> element in a web page, but <a href=http://html5.validator.nu/>it won&#8217;t validate</a>, <a href=semantics.html#unknown-elements>it won&#8217;t work consistently across browsers</a>, and it might conflict with future <abbr>HTML</abbr> specs if we want to add it later.

<p>Right, so if making up your own elements isn&#8217;t the answer, what&#8217;s a semantically inclined web author to do? There have been attempts to extend previous versions of <abbr>HTML</abbr>. The most popular method is <a href=http://microformats.org/>microformats</a>, which uses the <code>class</code> and <code>rel</code> attributes in <abbr>HTML</abbr>. Another option is <a href=http://www.w3.org/TR/rdfa-syntax/>RDFa</a>, which was originally designed to be used in <a href=past.html#postscript><abbr>XHTML</abbr></a> but has <a href=http://www.w3.org/TR/rdfa-in-html/>been ported to <abbr>HTML</abbr></a> as well.

Expand Down Expand Up @@ -134,7 +134,7 @@ <h2 id=data-model>The Microdata Data Model</h2>

<pre><code> &lt;TR>&lt;TD>Name&lt;TD <mark>itemprop="name"</mark>>Mark Pilgrim</code></pre>

<p>Adding the <code>url</code> property looks trickier. This markup doesn&#8217;t use the <code>&lt;a></code> element properly. Instead of putting the link target in the <code>href</code> attribute, it has nothing useful in the <code>href</code> attribute and uses Javascript in the <code>onclick</code> attribute to call a function (not shown) that extracts the <abbr>URL</abbr> and navigates to it. For extra &#8220;please stop doing that&#8221; bonus points, let&#8217;s pretend that the function also opens the link in a tiny popup window with no scroll bars. Wasn&#8217;t the internet fun last century?
<p>Adding the <code>url</code> property looks trickier. This markup doesn&#8217;t use the <code>&lt;a></code> element properly. Instead of putting the link target in the <code>href</code> attribute, it has nothing useful in the <code>href</code> attribute and uses Javascript in the <code>onclick</code> attribute to call a function (not shown) that extracts the <abbr>URL</abbr> and navigates to it. For extra &#8220;holy fuck, please stop doing that&#8221; bonus points, let&#8217;s pretend that the function also opens the link in a tiny popup window with no scroll bars. Wasn&#8217;t the internet fun last century?

<p>Anyway, you can still convert this into a microdata property, you just need to be a little creative. Using the <code>&lt;a></code> element directly is out of the question. The link target isn&#8217;t in the <code>href</code> attribute, and there&#8217;s no way to override the rule that says &#8220;in an <code>&lt;a></code> element, look for the microdata property value in the <code>href</code> attribute.&#8221; But you <em>can</em> add a wrapper element around the entire mess, and use that to add the <code>url</code> microdata property.

Expand Down Expand Up @@ -546,7 +546,7 @@ <h2 id=organization>Marking Up Organizations</h2>

<h2 id=event>Marking Up Events</h2>

<p>Events happen. Some events happen at pre-determined times. Wouldn&#8217;t it be nice if you could tell search engines exactly when an event was about to happen? There&#8217;s an angle bracket for that.
<p>Shit happens. Some shit happens at pre-determined times. Wouldn&#8217;t it be nice if you could tell search engines exactly when shit was about to happen? There&#8217;s an angle bracket for that.

<p>Let&#8217;s start by looking at <a href=examples/event.html>a sample schedule of my speaking engagements</a>.

Expand Down
10 changes: 10 additions & 0 deletions history.html
Expand Up @@ -60,6 +60,16 @@ <h2 id=how>The How</h2>

<p><a href=examples/history/fer.html>dive into dogs</a> is a straightforward but non-trivial example of using the <abbr>HTML5</abbr> history <abbr>API</abbr>. It demonstrates a common pattern: a long article with an associated inline photo gallery. In a supported browser, navigating the Next and Previous links in the photo gallery will update the photo in place <em>and update the <abbr>URL</abbr> in the browser location bar</em>, without triggering a full page refresh. In unsupported browsers &mdash; or, indeed, supported browsers where the user has disabled scripting &mdash; the links simply function as regular links, taking you to a new page with a full page refresh.

<p>This brings up an important point:

<div class=pf>
<h4>Professor Markup Says</h4>
<div class=inner>
<blockquote><p>If your web application fails in browsers with scripting disabled, Jakob Nielsen&#8217;s dog will come to your house and shit on your carpet.
</blockquote>
</div>
</div>

<p id=gallery-markup>Let&#8217;s dig into the <a href=examples/history/fer.html>dive into dogs</a> demo and see how it works. This is the relevant markup for a single photo:

<p class="legend top" style="padding-left:6em"><span class=arrow>&#x21b6;</span> The pledge
Expand Down
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -52,7 +52,7 @@ <h3>Table of Contents</h3>
<li><a href=forms.html>A Form of Madness</a>
<li><a href=extensibility.html>&#8220;Distributed,&#8221; &#8220;Extensibility,&#8221; And Other Fancy Words</a>
<li><a href=history.html>Manipulating History for Fun <i>&amp;</i> Profit</a>
<li class=app><a href=everything.html>The All-In-One Almost-Alphabetical Guide to Detecting Everything</a>
<li class=app><a href=everything.html>The All-In-One Almost-Alphabetical No-Bullshit Guide to Detecting Everything</a>
<li class=app><a href=peeks-pokes-and-pointers.html><abbr>HTML5</abbr> Peeks, Pokes and Pointers</a>
</ol>
<!-- /toc -->
Expand Down
2 changes: 1 addition & 1 deletion peeks-pokes-and-pointers.html
Expand Up @@ -958,7 +958,7 @@

<tr>
<td colspan=2><b>Miscellaneous tests</b>
<td colspan=6><i>See <a href=everything.html>The All-In-One Almost-Alphabetical Guide to Detecting Everything</a>.</i>
<td colspan=6><i>See <a href=everything.html>The All-In-One Almost-Alphabetical No-Bullshit Guide to Detecting Everything</a>.</i>

<tr>
<td>
Expand Down
4 changes: 2 additions & 2 deletions semantics.html
Expand Up @@ -51,7 +51,7 @@ <h2 id=the-doctype>The Doctype</h2>
</dl>
</blockquote>

<p>(You should read the rest of Henri&#8217;s article, because I&#8217;m simplifying immensely here. Even in IE5/Mac, there were a few older doctypes that didn&#8217;t count as far as opting into standards support. Over time, the list of quirks grew, and so did the list of doctypes that triggered &#8220;quirks mode.&#8221; The last time I tried to count, there were 5 doctypes that triggered &#8220;almost standards mode,&#8221; and 73 that triggered &#8220;quirks mode.&#8221; But I probably missed some, and I&#8217;m not even going to talk about the crazy things that Internet Explorer 8 does to switch between its four &mdash; four! &mdash; different rendering modes. <a href=http://hsivonen.iki.fi/doctype/ie8-mode.png>Here&#8217;s a flowchart</a>. Kill it. Kill it with fire.)
<p>(You should read the rest of Henri&#8217;s article, because I&#8217;m simplifying immensely here. Even in IE5/Mac, there were a few older doctypes that didn&#8217;t count as far as opting into standards support. Over time, the list of quirks grew, and so did the list of doctypes that triggered &#8220;quirks mode.&#8221; The last time I tried to count, there were 5 doctypes that triggered &#8220;almost standards mode,&#8221; and 73 that triggered &#8220;quirks mode.&#8221; But I probably missed some, and I&#8217;m not even going to talk about the crazy shit that Internet Explorer 8 does to switch between its four &mdash; four! &mdash; different rendering modes. <a href=http://hsivonen.iki.fi/doctype/ie8-mode.png>Here&#8217;s a flowchart</a>. Kill it. Kill it with fire.)

<p>Now then. Where were we? Ah yes, the doctype:

Expand Down Expand Up @@ -197,7 +197,7 @@ <h4>Ask Professor Markup</h4>
<div class=inner>
<blockquote class=note>
<p><span>&#x261E;</span>Q: Can I make up my own link relations?<br>
<p>A: There seems to be an infinite supply of ideas for new link relations. In an attempt to prevent people from <a href=http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html#//apple_ref/doc/uid/TP40002051-CH3-SW4>just making stuff up</a>, the microformats community <a href=http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions>maintains a registry of proposed <code>rel</code> values</a> and the HTML specification <a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#other-link-types>defines the process for getting them accepted</a>.
<p>A: There seems to be an infinite supply of ideas for new link relations. In an attempt to prevent people from <a href=http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html#//apple_ref/doc/uid/TP40002051-CH3-SW4>just making shit up</a>, the microformats community <a href=http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions>maintains a registry of proposed <code>rel</code> values</a> and the HTML specification <a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#other-link-types>defines the process for getting them accepted</a>.
</blockquote>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion table-of-contents.html
Expand Up @@ -178,7 +178,7 @@ <h1>Table of Contents</h1>
<li><dl><dt><a href=history.html#how>The How</a><dd>iii</dl>
<li><dl><dt><a href=history.html#further-reading>Further Reading</a><dd>iv</dl>
</ol>
<li class=app><a href=everything.html>The All-In-One Almost-Alphabetical Guide to Detecting Everything</a>
<li class=app><a href=everything.html>The All-In-One Almost-Alphabetical No-Bullshit Guide to Detecting Everything</a>
<ol>
<li><dl><dt><a href=everything.html#further-reading>Further Reading</a><dd>i</dl>
</ol>
Expand Down

0 comments on commit 19a1dde

Please sign in to comment.