SEO

Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

October 11, 2011

Normalize THICSS! PLUS (Inline HTML5 Inline ConverCSSion by Premailer for NoCSSterous!)

Normalize THICSS!

PLUS (Premailer for NoCSSterous)

normalize.css

Normalize.css is a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. We researched the differences between default browser styles in order to precisely target only the styles that need normalizing.

Check out the demo

What does it do?

Normalize THICSS! PLUS (Inline HTML5 Inline ConverCSSion by Premailer for NoCSSterous!)

 

  • Preserves useful defaults, unlike many CSS resets.
  • Normalizes styles for a wide range of elements.
  • Corrects bugs and common browser inconsistencies.
  • Improves usability with subtle improvements.
  • Explains what code does using detailed comments.

How to use it

Normalize.css is intended to be used as an alternative to CSS resets.

It is suggested that you read through the normalize.css file and customise it to meet the design requirements of a project rather including it as a "black box".

If you prefer to use a different CSS formatting style, consider using a tool like Procssor.

If you would like to minify the file, you can use a tool like this online CSS compressor using YUI Compressor or perform the minification as part of your build process.

Browser support

  • Google Chrome
  • Mozilla Firefox 3+
  • Apple Safari 4+
  • Opera 10+
  • Internet Explorer 6+

License

Public domain

Acknowledgements

Normalize.css is a project by Nicolas Gallagher and Jonathan Neal.

  • First Page
  • Second Page
  • Third Page
  • Last Page

Section Heading 1

#boxsize button, #boxsize input, #boxsize select, #boxsize textarea { width: 200px; padding: 5px; border: 1px solid #333; }

Grouped Heading 1

Grouped Heading 2

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This should be hidden in all browsers, apart from IE6

Section Heading 1

Article Heading 2

Address: somewhere, world
Dogmeat_and_tbl_invented_the_internet_have_you_seen_it
Wer
Dogmeat_and_eric_meyer_invented_css_dont_forget_howcome_have_you_seen_it

 

Minification v Obfuscation

March 6, 2006 at 7:08 pm by Douglas Crockford | In Development | 61 Comments

JavaScript is a load-and-go language. Programs are delivered to the execution site as text (not as executable or semi-compiled class files) where it is compiled and executed. JavaScript works well with the Web, which is a text delivery system, because it is delivered as text.

There are two downsides of textual delivery of programs. The first is code size. The source can contain material (such as whitespace and comments) which aids in the human interpretability of the program, but which is not needed for its execution. Transmitting superfluous material can significantly delay the download process, which keeps people waiting. If we could first strip out the whitespace and comments, our pages would load faster.

The second downside is code privacy. There might be a concern that someone could read the program and learn our techniques, and worse, compromise our security by learning the secrets that are embedded in the code.

There are two classes of tools which deal with these problems: minifiers and obfuscators.

A minifier removes the comments and unnecessary whitespace from a program. Depending on how the program is written, this can reduce the size by about half. An obfuscator also minifies, but it will also make modifications to the program, changing the names of variables, functions, and members, making the program much harder to understand, and further reducing its size in the bargain. Some obfuscators are quite aggressive in their transformations. Some require special annotations in the source program to indicate what changes might or might not be safe.

Any transformation carries the risk of introducing a bug. Even if the obfuscator didn’t cause the bug, the fact that it might have is a distraction which will slow down the debugging process. The modifications to the program also add significantly to the difficulty of debugging.

After minifying or obfuscating, you should GZIP. GZIP can further reduce the size of the program. GZIP is so effective that the difference in the efficiency between minification and obfuscation becomes insignificant. So I prefer minification with GZIP because I don’t have time for programming tools that can inject bugs into good programs.

  Full Source Minified
Uncompressed 78151 38051
Compressed with gzip 15207 10799

The table shows the results of using a minifer and gzip on a 78K source file. The result of using the two techniques together produced a result that is only 14% the size of the original source file.

Then finally, there is that question of code privacy. This is a lost cause. There is no transformation that will keep a determined hacker from understanding your program. This turns out to be true for all programs in all languages, it is just more obviously true with JavaScript because it is delivered in source form. The privacy benefit provided by obfuscation is an illusion. If you don’t want people to see your programs, unplug your server.

Text-level semantics

The a element example
The abbr element and abbr element with title examples
The b element example
The cite element example
The code element example
The del element example
The dfn element and dfn element with title examples
The em element example
The i element example
The img element example
The ins element example
The kbd element example
The mark element example
The q element inside a q element example
The s element example
The samp element example
The small element example
The span element example
The strong element example
The sub element example
The sup element example
The var element example
The u element example

Embedded content

audio

img

svg

video

Grouping content

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.

pre

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et me.
<html> <head> </head> <body> <div class="main"> <div> </body> </html>

blockquote

Some sort of famous witty quote marked up with a <blockquote> and a child <p> element.

Even better philosophical quote marked up with just a <blockquote> element.

ordered list

  1. list item 1
  2. list item 1
    1. list item 2
    2. list item 2
      1. list item 3
      2. list item 3
    3. list item 2
    4. list item 2
  3. list item 1
  4. list item 1

unordered list

  • list item 1
  • list item 1
    • list item 2
    • list item 2
      • list item 3
      • list item 3
    • list item 2
    • list item 2
  • list item 1
  • list item 1

description list

Description name
Description value
Description name
Description value
Description value
Description name
Description name
Description value

figure

Figcaption content

Tabular data

Jimi Hendrix - albums
Album Year Price
Album Year Price
Are You Experienced 1967 $10.00
Axis: Bold as Love 1967 $12.00
Electric Ladyland 1968 $10.00
Band of Gypsys 1970 $12.00

Forms

Inputs as descendents of labels (form legend)

Inputs as siblings of labels

Clickable inputs and buttons

Reset (button)

Button (button)

Submit (button)

box-sizing tests
Reset (button)
Button (button)
Submit (button)

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.

Agnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat ma.

Section Heading 2

Agnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat ma.

Section Heading 3

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.

Article Heading 4

Agnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat ma.

Article Heading 5

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.

Article Heading 6

Agnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat ma.

  1. Sed ut perspiciatis unde
  2. omnis iste natus error
  3. sit voluptatem accusantium
  • doloremque laudantium
  • totam rem aperiam eaque
  • ipsa quae ab illo
Definition list term #1
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Definition list term #2
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.

Confucius, The Confucian Cite, (551 BC - 479 BC)

Jimi Hendrix - albums
Album Year Price
Album Year Price
Are You Experienced 1967 $10.00
Axis: Bold as Love 1967 $12.00
Electric Ladyland 1968 $10.00
Band of Gypsys 1970 $12.00

Lorem ipsum dolor a element sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor sit amet, consectetur abbr element adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor b element sit amet, consectetur i element adipisicing elit, sed s element do eiusmod tempor u element incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor code element sit amet, consectetur kbd element adipisicing elit, sed samp element do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor sit amet, consectetur strong element adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor cite element sit amet, consectetur dfn element adipisicing elit, sed em element do eiusmod tempor q element incididunt ut labore var element et dolore magna aliqua.

Lorem ipsum dolor sit amet, consectetur del element adipisicing elit, sed strike element do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor sit amet, consectetur ins element adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed sub element do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore sup element et dolore magna aliqua.

Normalize THICSS! PLUS (Premailer for NoCSSterous) normalize.css Normalize.css is a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. We researched the differences between default browser styles in order to precisely target only the st ...»See Ya

May 28, 2011

Help Eric CSS3 Meyer Back to Future from Premailer Jungle

 Help Eric Meyer Link Back to CSS3 Future from Premailer Inline Jungle

AND HURRY BEFORE THE AMAZON LINK SIGNATURE EXPIRES on 1306587893...whenever the fuck that is...

and p.s. When the fuck did links and imgs start EXPIRING? Is Amazon afraid it's gonna JUNK UP THE INTERNET TOO MUCH?

HAHAHAHAHAHAHAHA!

The general situation here is: there are many instances where making element content link to other content via HTML requires clumsy structures, and others where it is basically impossible. One example of clumsiness is linking images, which requires wrapping an a

Slide0290
element around an img element just to make the latter "clickable". One example of impossibility is linking an entire table row.

Some possible solutions:

Leave things as they are and stick with DOM events to recreate this ability
  • Pros:
    • Works today and should continue to work into the future
  • Cons:
    • Fails in non-JS situations
    • Is substantially more complicated for authors (JS frameworks can lessen but do not eliminate the complexity, and their use balloons page weight)
    • Does not allow the added semantics of hreflang, media, ping, rel, target, and type
Add href, hreflang, media, ping, rel, target, and type to a number of elements in HTML5
  • Pros:
    • Leverages known attribute semantics
    • Very simple for authors to understand, recycling as it does attributes with which they are already familiar
    • Leaner markup
  • Cons:
    • Will not be understood by legacy user agents (this can be ameliorated with JS)
    • Adds a number of attributes to a number of elements
Devise some other attribute, such as link, which has the same basic effect
  • Pros:
    • Fairly simple for authors to learn and understand, given its similarity to an attribute with which they are familiar
    • Leaner markup
  • Cons:
    • Will not be understood by legacy user agents (this may be amenable to JS amelioration in said UAs, depending on their tolerance of unrecognized attributes)
    • Adds a number of attributes to a number of elements
    • Means inventing a new attribute that is very similar to an existing attribute
    • Requires the invention of (e.g.) linklang to add the semantics of hreflang (the other attributes can still be added as is)
Change a so that it can wrap around any arbitrary collection of elements
  • Pros:
    • Makes linking much more flexible
    • Very simple for authors to understand, based as it is on an element with which they are familiar
  • Cons:
    • May not be understood properly by legacy user agents, possibly resulting in failure to link (due to HTML4/XHTML1 element-termination rules) or in failure to display portions of a document (due to parsing bugs)
    • Still requires wrapping a link-specific element around other elements, which does not result in leaner markup
Devise some new element like hlink that can wrap around any arbitrary collection of elements
  • Pros:
    • Makes linking much more flexible
  • Cons:
    • Will not be understood by legacy user agents (this may be amenable to JS amelioration in said UAs, depending on their tolerance of unrecognized elements)
    • Still requires wrapping a link-specific element around other elements, which does not result in leaner markup

Case By Case

Beyond the general case, it is very helpful to look at individual elements that would benefit from being linkable and demonstrate the reasons why this capability would be helpful.

The Holdover

Just to make clear that there are strong reasons to keep the traditional linking element as a member of the firmament.

 

 

  1. a

    Existing attributes
    href hreflang media ping rel target type
    Rationale for element preservation

    Not every instance of a hyperlink will be centered on some non-a element. Having a generic hyperlink element is still just as valuable as the day the web was invented. Furthermore, there would be something of a backwards-compatibility issue if the element were dropped.

New Additions

The elements for which I felt able to justify calling for addition of linking ability. The general guiding principle is that any case where it would be reasonable to wrap an a element around an element, or have an a element be the sole child of an element, indicates strong potential for a valid use case.

In my examples I use the href attribute because it makes the most sense to me, but in all cases I considered foremost whether it made sense to have an element become linkable as orthogonal to the exact method of achieving that linkage. Collectively, these form an argument for allowing a more robust and flexible linking mechanism, regardless of its specific form. Note too that I am assuming that adding href also means adding hreflang, media, ping, rel, target, and type, for all the reasons those attributes are useful for the a element.

  1. abbr

    Existing attributes
    title
    Rationale for addition

    There are two primary situations where an abbreviation should be linked elsewhere: when linking to an organization whose name is an abbreviation; and when linking to a dfn-enclosed definition of the abbreviation elsewhere in the document.

    Note: if acronym is ever restored to HTML5, the same rationale and use cases given here would apply for that element. I'm not holding my breath.

    Example(s)
    <p>The <dfn id="whatwg"><abbr title="Web Hypertext Application Technology Working Group" href="http://whatwg.org/">WHATWG</abbr></dfn> is a loose unofficial collaboration of Web browser manufacturers and interested parties who wish to develop new technologies designed to allow authors to write and deploy Applications over the World Wide Web.</p> <p>The <abbr title="Web Hypertext Application Technology Working Group" href="#whatwg">WHATWG</abbr> community does not have much representation from Asia.</p>
  2. address

    Rationale for addition

    Linked author contact information is generally more useful than unlinked author contact information.

    Example(s)
    <address href="mailto:emeyer@example.com">Eric A. Meyer</address> <address href="http://meyerweb.com/eric/">Eric A. Meyer</address> <address href="http://mag.example.com/article/132/authors/">Ian Hickson, David Baron, and the Dalai Lama</address>
  3. aside

    Rationale for addition

    In cases where an aside is a pullquote, it makes sense to link to the source of the quote that's been pulled. It may also be the case that an aside references an external resource and that linking the entire aside to that resource is a better user experience than linking a subset of the aside's text with an a element.

    Example(s)
    <aside href="http://guide.example.org/">Want to learn more? Our Giving Guide has the answers you seek!</aside> <p>He later joined a large company, continuing on the same work. <q>I love my job. <span id="aside-03">People ask me what I do for fun when I'm not at work. But I'm paid to do my hobby, so I never know what to answer.</span> Some people wonder what they would do if they didn't have to work... but I know what I would do, because I was unemployed for a year, and I filled that time doing exactly what I do now.</q></p> <aside href="#aside-03"> <q> People ask me what I do for fun when I'm not at work. But I'm paid to do my hobby, so I never know what to answer. </q> </aside>
  4. blockquote

    Existing attributes
    cite
    Rationale for addition

    To create a link to the source of the quoted material. This alone could be handled by the cite attribute, but the problem is that all of the linking semantics offered by the a element's attributes are lost here. Thus, for example, it is impossible to indicate the media type of a podcast, or the base language of a quoted article.

    It is possible that both cite and href could be present with differing values. This would permit a citation of the whole work while linking to a section of the work, for example. In cases where a blockquote has differing values for cite and href, the href value should be used when the user activates the element.

    Example(s)
    <blockquote href="http://podcast.example.net/42" media="audio/x-mp3"> <p>So I told him I wasn't interested unless he threw in a Coney Island hot dog.</p> </blockquote> <blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/" href="http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote"> <p>The best way to represent a conversation is not with the cite and blockquote elements, but with the dialog element.</p> </blockquote>
  5. cite

    Rationale for addition

    To create a link to the cited resource. With the various attributes, it becomes possible to indicate the media type of cited a podcast, or the base language of a cited article.

    Example(s)
    <p><cite href="http://www.whatwg.org/specs/web-apps/current-work/">HTML5</cite> is a work in progress.</p> <p>I found <cite href="http://podcast.example.net/42" media="audio/x-mp3">Episode 42 of the "Frank 'n' Beans Hour"</cite> to be less amusing than previous entries.</p>
  6. code

    Rationale for addition

    A fragment of code may need to be linked to the program from which it has been excerpted, or to documentation on that bit of code.

    Example(s)
    <p>In WordPress, information about the blog installation can be retrieved using the <code href="http://codex.wordpress.org/Template_Tags/bloginfo">bloginfo()</code> function.</p>
  7. del

    Existing attributes
    cite datetime
    Rationale for addition

    Providing a link to more detailed reasoning about the deletion. This alone could be handled by the cite attribute, but the problem is that all of the linking semantics offered by the a element's attributes are lost.

    It is possible that both cite and href could be present with differing values. This would permit a citation of the whole work while linking to a section of the work, for example. In cases where a del has differing values for cite and href, the href value should be used when the user activates the element.

     

    Example(s)
    <del cite="http://blog.example.com/2008/06/04/sorry-hixie-i-was-on-drugs" href="http://blog.example.com/2008/06/04/sorry-hixie-i-was-on-drugs#p5" datetime="2008-06-04T23:45-04:00">I really hate cats.</del>
  8. dfn

    Existing attributes
    title
    Rationale for addition

    While there can be provision of an in-document definition, it is often useful to link to a more detailed or extended definition.

    Example(s)
    <p>The <dfn href="http://www.gateworld.net/omnipedia/technology/links/g.d.o..shtml"> <abbr title="Garage Door Opener">GDO</abbr></dfn> is a device that allows off-world teams to open the iris.</p>
  9. dialog

    Rationale for addition

    In cases where a fragment of a longer dialog is presented, it is useful to be able to link back to the original source dialog, so as to provide the context for the provided fragment.

    Note: it may be argued that this can be made unnecessary by wrapping the dialog element in a linked blockquote element.

    Example(s)
    <dialog href="http://meyerweb.com/eric/thoughts/2006/11/19/thats-pretty-old/"> <dt>Carolyn</dt> <dd>Daddy, what old is Bear?</dd> <dt>Eric</dt> <dd>Do you mean how old is Bear?</dd> <dt>Carolyn</dt> <dd>How old is Bear, yes.</dd> <dt>Eric</dt> <dd>I don't know, sweetie. How old do you think he is?</dd> </dialog>
  10. div

    Rationale for addition

    There are times when a flow element is needed to contain a few bits of information that are all related, and could all benefit from being linked to an in-depth resource. Examples include error messages, portal boxes, and artistic gallery pages.

    Example(s)
    <div id="error_note" href="/error-list.html"> <h3>Errors</h3> <p>No errors.</p> </div> <div class="photo" href="19823-detail.html"> <img src="pix/19283.jpg" alt="" /> 19283. Lady in waiting. </div>
  11. figure

    Rationale for addition

    A figure may properly link to more information or an alternate view of the content(s) enclosed in the figure. Examples include high-resolution versions of displayed images, pages which provide more detailed information about the figure, and so on.

    Example(s)
    <figure href="bubbles-work-hires.jpg"> <img src="bubbles-work.jpeg" alt="Bubbles, sitting in his office chair, works on his latest project intently."> <legend>Bubbles at work</legend> </figure> <figure href="castle-history.html"> <img src="castle1423.jpeg" title="Etching. Anonymous, ca. 1423." alt="The castle has one tower, and a tall wall around it."> <img src="castle1858.jpeg" title="Oil-based paint on canvas. Maria Towle, 1858." alt="The castle now has two towers and two walls."> <img src="castle1999.jpeg" title="Film photograph. Peter Jankle, 1999." alt="The castle lies in ruins, the original tower all that remains in one piece."> <legend>The castle through the ages: 1423, 1858, and 1999 respectively.</legend> </figure>
  12. footer

    Rationale for addition

    While footers may contain multiple pieces of information, in many cases they will be used to provide "back to top" or "back to table of contents" functionality. It is also possible that a footer containing a quick notice of ownership would need to link to a more detailed page containing terms of use, privacy policies, and more.

    Example(s)
    <footer href="../">Back to index...</footer> <h1>Lorem ipsum</h1> <p>A dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip xea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <footer href="../">Back to index...</footer>
  13. h1

    Rationale for addition

    Headings are sometimes linked to other resources. One example would be linking a site-identifying h1 to the home page of the site.

    Example(s)
    <h1 href="/index.html">ConHugeCo Inc.</h1>
  14. h2

    Rationale for addition

    Headings are sometimes linked to other resources. One example would be linking the chapter titles in a table of contents to the actual chapter documents.

    Example(s)
    <h1>Table of Contents</h1> <h2 href="ch1.html">Chapter 1. Introduction</h2> <h2 href="ch2.html">Chapter 2. Tea For Two</h2> <h2 href="ch3.html">Chapter 3. Thrice the Price</h2> <h2 href="ch4.html">Chapter 4. The Larch</h2>
  15. h3

    Rationale for addition

    Headings are sometimes linked to other resources. One example would be linking the section and subsection headings of a particularly long document back to the top of the page.

    Example(s)
    <h3 href="#top">Enjoying the sun</h3>
  16. h4

    Rationale for addition

    Headings are sometimes linked to other resources.

    Example(s)

    See the examples for h1, h2, and h3.

  17. h5

    Rationale for addition

    Headings are sometimes linked to other resources.

    Example(s)

    See the examples for h1, h2, and h3.

  18. h6

    Rationale for addition

    Headings are sometimes linked to other resources.

    Example(s)

    See the examples for h1, h2, and h3.

  19. img

    Existing attributes
    alt height ismap src usemap width
    Rationale for addition

    It is incredibly common to have an image link to some other resource—a higher-resolution version, a resource of another medium (such as an image of a speaker linking to an audio file), or another web page.

    Example(s)
    <img src="picture22.gif" href="picture22-hires.gif" alt="A picture of my face"> <img src="audio.gif" alt="Audio file (822KB)" href="ringtone.mp3"> <img href="page27.html" src="next.gif" alt="Next page">
  20. ins

    Existing attributes
    cite datetime
    Rationale for addition

    Providing a link to more detailed reasoning about the insertion. This alone could be handled by the cite attribute, but the problem is that all of the linking semantics offered by the a element's attributes are lost.

    It is possible that both cite and href could be present with differing values. This would permit a citation of the whole work while linking to a section of the work, for example. In cases where a ins has differing values for cite and href, the href value should be used when the user activates the element.

     

    Example(s)
    <ins cite="http://blog.example.com/2008/06/04/sorry-hixie-i-was-on-drugs" href="http://blog.example.com/2008/06/04/sorry-hixie-i-was-on-drugs#p8" datetime="2008-06-04T23:45-04:00">I just lurrrve cats, especially little kitties.</ins>
  21. kbd

    Rationale for addition

    There are circumstances in which a bit of keyboard input needs to be linked to explanatory information. This would be especially useful in "help" systems and tutorials for newcomers to a program (or computing in general).

    Example(s)
    If you want to access the console press <kbd href="where-is-the-tilde-key.htm">Tilde</kbd>
  22. legend

    Rationale for addition

    There are circumstances in which the legend of a figure, fieldset, or other containing object should link to more information or a related resource.

    Example(s)
    <fieldset> <legend href="/help/personalinfo.html">Personal information</legend> ... </fieldset> <figure>   

    You do not have Java available, or it is disabled.

    <legend href="/proj/java/clock.html">My Java Clock</legend> </figure>
  23. li

    Existing attributes
    value
    Rationale for addition

    In many cases, most obviously the use of a list to contain a set of navigation links, list items are entirely filled by hyperlinks and no other content. Although the a elements may sometimes be useful for styling purposes, they are superfluous structural elements and could in some cases be replaced by linked list items.

    Example(s)
    <nav> <h1>Navigation</h1> <ul> <li href="articles.html">Index of all articles<li> <li href="today.html">Things sheeple need to wake up for today<li> <li href="successes.html">Sheeple we have managed to wake<li> </ul> </nav>
  24. mark

    Rationale for addition

    Content which has been highlighted using mark may be served by creating a link to some resource which explains in more detail the reason for the highlighting. It also provides a method by which highlighting marks can refer to other parts of the same document.

    Example(s)
    <p><mark href="#notes">An obstruction in a gate will prevent it from accepting a wormhole connection.</mark></p>
  25. meter

    Existing attributes
    high low max min optimum value
    Rationale for addition

    Meters will often benefit from being linked to resources which explain how the metered levels are determined, or to give more detailed information about the specific metering level being displayed.

    Example(s)
    <p><meter value="0.25" href="/ranking.html#low">Low activity,</meter> Usenet, 66 subscribers</p> <meter href="/how-we-measure.html" min=0 max=20 value=12 title="centimeters">12cm</meter>
  26. progress

    Existing attributes
    max value
    Rationale for addition

    In a fashion similar to meter, progress indicators will in some cases need to be linked to more details about the thing whose progress is being tracked. This would be especially helpful in cases where there are multiple progress indicators on a single page, such as a download tracker.

    Example(s)
    <progress href="details?thing=7">21%</progress>
  27. q

    Existing attributes
    cite
    Rationale for addition

    To create a link to the source of the quoted material. This alone could be handled by the cite attribute, but the problem is that all of the linking semantics offered by the a element's attributes are lost here. Thus, for example, it is impossible to indicate the media type of a podcast, or the base language of a quoted article.

    It is possible that both cite and href could be present with differing values. This would permit a citation of the whole work while linking to a section of the work, for example. In cases where a q has differing values for cite and href, the href value should be used when the user activates the element.

    Example(s)
    <p>As Tim Berners-Lee said, <q href="http://example.com/quotes/tbl33.html"> "That idea of URL was the basic clue to the universality of the Web. That was the only thing I insisted upon."</q></p> <p>His best argument: <q href="http://lists.example.org/Archives/2008/Mar/71193#p22" cite="http://lists.example.org/Archives/2008/Mar/71193">I disagree!</q></p>
  28. samp

    Rationale for addition

    Samples of output are often not enough to provide a full working knowledge of their causes and resolution. Linking to more information is often desirable in these circumstances.

    Example(s)
    The program responded with <samp href="manual-error500.html">Error 500: Program had an error!</samp>, so I reverted the config file.
  29. sub

    Rationale for addition

    Subscript elements often represent terms or concepts which may be unfamiliar to the reader; for example, in formulas. They can also be used to denote numeric systems which would benefit from being linked to more detailed explanations.

    Example(s)
    V = <sub href="transverse.html">T</sub> - <sub href="radial.html">r</sub> 100<sub href="binary.html">bin</sub> = 4<sub href="decimal.html">dec</sub></pre>
  30. sup

    Rationale for addition

    Superscript elements are used to create footnote references, and those references are usually linked to the actual footnotes (with corresponding superscripted numbers in the footnotes that link back to the referencing text). Rather than having a sup wrapping an a element, it would make more sense to link the superscript itself.

    Example(s)
    <p>It has been shown that the decline in pirates is directly correlated to the rise in global temperatures.<sup href="#footnote-003">[3]</sup></p>
  31. td

    Existing attributes
    colspan rowspan
    Rationale for addition

    In tables of data, each cell is often a small fragment of content summarizes more in-depth data. For example, a cell might contain a total dollar amount for a certain product or period of time (or both), or test results, or any number of other things. The ability to click on that cell and get a detailed breakdown of the figures that went into the presented content is highly valuable.

    Example(s)
    <td href="sales?product=a44">$27,924</td> <td href="benchmark?ua=ff&t=7">244ms</td>
  32. th

    Existing attributes
    colspan rowspan scope
    Rationale for addition

    Table headers can be cryptic in the interests of having small amounts of content. Being able to link from those cells directly to a legend (or key) explaining what they mean improves the usefulness of the table.

    Example(s)
    <th href="legend.html#PHA">PHA</th> <th href="legend.html#O2V%">O2V %</th>
  33. time

    Existing attributes
    datetime
    Rationale for addition

    There are two use cases here. The first is where time-based information may need to link to more detailed information; for example, the times in a public transportation schedule linking to more information about that route, station, or bit of the schedule. The other, which is already widespread, is the use of posting times as "permalinks" for both blog posts and comments on them.

    Example(s)
    <time datetime="2008-06-05T16:50:37-00:00" href="http://meyerweb.com/eric/thoughts/2008/06/05/strengthening-links/">Thu 5 Jun 2008 1250</time>
  34. tr

    Rationale for addition

    In tables of data, each row is often a grouping of information that summarizes more in-depth data. For example, a row of numbers showing income and expense totals for one month of the year could link to a detailed breakdown of that month's activity. The ability to click on the row to get to that information is highly valuable.

    Example(s)
    <tr href="show_flow.php?month=200805"> ... </tr> <tr href="sales?state=OH&product=722"> ... </tr>
  35. var

    Rationale for addition

    A variable may be defined (in the sense of its role in a program being explained) away from mention of the variable, so linking to the definition assists in recall and learning. Less commonly, there may be a need to link to related material which explains the use of variables in general.

    Example(s)
    <p>Here we pass the variable <var href="#var-loop">loop</var> to the function.</p> <p>If there are <var href="what-is-n.html">n</var> pipes leading to the ice cream factory then I expect at <em>least</em> <var>n</var> flavours of ice cream to be available for purchase!</p>
  36. video

    Rationale for addition

    It is a widespread convention that embedded video leads back to a main page or other resource describing more about the video (see, for example, any embedded YouTube or Vimeo video).

    Example(s)
    <video src="bigdog.mov" href="http://bostondynamics.com/content/sec.php?section=BigDog" autoplay controls>

Possible Additions

These are the elements that seemed to be good candidates on the first pass, but upon further reflection failed to present obvious use cases. I'm open to suggestions.

  1. article

    Rationale for addition

    I'm not sure there's any reasonable case for linking an entire article.

    Example(s)
    ???
  2. caption

    Rationale for addition

    I had thought that a caption could link to more information about the table in question, but that seemed better handled by linking the actual table itself.

    Example(s)
    ???
  3. dd

    Rationale for addition

    Sort of by definition (ah ha ha), the contents of this element should provide whatever information is needed—in other words, there shouldn't be a need to link to more detailed information.

    Example(s)
    ???
  4. details

    Existing attributes
    open
    Rationale for addition

    I'm not even 100% sure I get what this element is meant to do, so it was hard to find a use case for linking it.

    Example(s)
    ???
  5. dt

    Rationale for addition

    The only thing this would seem to need to link to is the associated dd, which is right there in the markup (as in adjacent) so attribute-based linking doesn't seem to make much sense. On the other hand, should this be added as a machinie-parseable way of associating a definition with the term? Or do we rely on the structural adjacency for that?

    Example(s)
    ???
  6. header

    Rationale for addition

    There was a fairly straightforward use case for footer, but this didn't have the same ease of casing.

    Example(s)
    ???
  7. p

    Rationale for addition

    A whole paragraph as a link... hmmm. This didn't seem too likely a scenario.

    Example(s)
    ???
  8. pre

    Rationale for addition

    Like p, it was hard to think of a reason to need to link an entire pre.

    Example(s)
    ???
  9. span

    Rationale for addition

    It really seemed like if you needed a generic inline element to create a hyperlink, you'd use a, not span.

    Example(s)
    ???
  10. table

    Rationale for addition

    Do the rationales presented for tr, th, and td make sense when applied to the whole table? Are there other rationales for full-table linking?

    Example(s)
    ???
  11. tbody

    Rationale for addition

    Though it seemed obvious that one would extrapolate from cell linking to row linking to table-sectional linking, no specific use cases came to mind when actually faced with tbody. If it's possible to have multiple tbody elements in the same table, then use cases are much easier to imagine, but the specification doesn't make clear whether or not this is the case. If multiples are not allowed, then is there any reason to make this element linkable? (The same questions and thinking hold for tfoot and thead.)

    Example(s)
    ???
  12. tfoot

    Rationale for addition

    See tbody.

    Example(s)
    ???
  13. thead

    Rationale for addition

    See tbody.

    Example(s)
    ???

(Possibly) Unsuitable Elements

These are the elements that did not seem to have use cases when I first went through the list. They are included here to round out the list of HTML5 elements, and also as a resource for reconsidering whether any of them would benefit from being linkable.

  1. audio
  2. b
  3. bdo
  4. body
  5. br
  6. canvas
  7. col
  8. colgroup
  9. command
  10. datagrid
  11. datatemplate
  12. dl
  13. em
  14. embed
  15. event-source
  16. hr
  17. html
  18. i
  19. iframe
  20. mark
  21. map
  22. menu
  23. meta
  24. nav
  25. nest
  26. noscript
  27. object
  28. ol
  29. param
  30. rule
  31. script
  32. section
  33. small
  34. source
  35. strong
  36. style
  37. title
  38. ul

Elements That Already Link

Those elements that already provide some form of linking via the href attribute, and so don't need extra linkability. Two—a and area—also have the attributes hreflang, media, ping, rel, target, and type.

  1. a
  2. area
  3. base
  4. link
Published Thursday 5 June 2008 16:09:18 UTC - Last updated Thursday 12 June 2008 19:00:57 UTC

Example(s) href="http://podcast.example.net/42" media="audio/x-mp3"> So I told him I wasn't interested unless he threw in a Coney Island hot dog. href="http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote"> The best way to represent a conversation is not with the cite and blockquote elements, but with the dialog element. * cite ---- Rationale for addition To create a link to the cited resource. With the various attributes, it becomes possible to indicate the media type of cited a podcast, or the base language of a cited article. Example(s) href="http://www.whatwg.org/specs/web-apps/current-work/">HTML5 is a work in progress. I found href="http://podcast.example.net/42" media="audio/x-mp3">Episode 42 of the "Frank 'n' Beans Hour" to be less amusing than previous entries. * code ---- Rationale for addition A fragment of code may need to be linked to the program from which it has been excerpted, or to documentation on that bit of code. Example(s) In WordPress, information about the blog installation can be retrieved using the href="http://codex.wordpress.org/Template_Tags/bloginfo">bloginfo() function. * del --- Existing attributes cite datetime Rationale for addition Providing a link to more detailed reasoning about the deletion. This alone could be handled by the cite attribute, but the problem is that all of the linking semantics offered by the a element's attributes are lost. It is possible that both cite and href could be present with differing values. This would permit a citation of the whole work while linking to a section of the work, for example. In cases where a del has differing values for cite and href, the href value should be used when the user activates the element. Example(s) href="http://blog.example.com/2008/06/04/sorry-hixie-i-was-on-drugs#p5" datetime="2008-06-04T23:45-04:00">I really hate cats. * dfn --- Existing attributes title Rationale for addition While there can be provision of an in-document definition, it is often useful to link to a more detailed or extended definition. Example(s) The href="http://www.gateworld.net/omnipedia/technology/links/g.d.o..shtml"> GDO is a device that allows off-world teams to open the iris. * dialog ------ Rationale for addition In cases where a fragment of a longer dialog is presented, it is useful to be able to link back to the original source dialog, so as to provide the context for the provided fragment. Note: it may be argued that this can be made unnecessary by wrapping the dialog element in a linked blockquote element. Example(s) href="http://meyerweb.com/eric/thoughts/2006/11/19/thats-pretty-old/"> Carolyn Daddy, what old is Bear? Eric Do you mean how old is Bear? Carolyn How old is Bear, yes. Eric I don't know, sweetie. How old do you think he is? * div --- Rationale for addition There are times when a flow element is needed to contain a few bits of information that are all related, and could all benefit from being linked to an in-depth resource. Examples include error messages, portal boxes, and artistic gallery pages. Example(s) href="/error-list.html"> Errors ------ No errors. href="19823-detail.html"> 19283. Lady in waiting. * figure ------ Rationale for addition A figure may properly link to more information or an alternate view of the content(s) enclosed in the figure. Examples include high-resolution versions of displayed images, pages which provide more detailed information about the figure, and so on. Example(s) href="bubbles-work-hires.jpg"> Bubbles at work href="castle-history.html"> The castle through the ages: 1423, 1858, and 1999 respectively. * footer ------ Rationale for addition While footers may contain multiple pieces of information, in many cases they will be used to provide "back to top" or "back to table of contents" functionality. It is also possible that a footer containing a quick notice of ownership would need to link to a more detailed page containing terms of use, privacy policies, and more. Example(s) href="../">Back to index... *********** Lorem ipsum *********** A dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip xea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. href="../">Back to index... * h1 -- Rationale for addition Headings are sometimes linked to other resources. One example would be linking a site-identifying h1 to the home page of the site. Example(s) ********************************* href="/index.html">ConHugeCo Inc. ********************************* * h2 -- Rationale for addition Headings are sometimes linked to other resources. One example would be linking the chapter titles in a table of contents to the actual chapter documents. Example(s) ***************** Table of Contents ***************** --------------------------------------- href="ch1.html">Chapter 1. Introduction --------------------------------------- -------------------------------------- href="ch2.html">Chapter 2. Tea For Two -------------------------------------- ------------------------------------------- href="ch3.html">Chapter 3. Thrice the Price ------------------------------------------- ------------------------------------ href="ch4.html">Chapter 4. The Larch ------------------------------------ * h3 -- Rationale for addition Headings are sometimes linked to other resources. One example would be linking the section and subsection headings of a particularly long document back to the top of the page. Example(s) href="#top">Enjoying the sun ---------------------------- * h4 -- Rationale for addition Headings are sometimes linked to other resources. Example(s) See the examples for h1, h2, and h3. * h5 -- Rationale for addition Headings are sometimes linked to other resources. Example(s) See the examples for h1, h2, and h3. * h6 -- Rationale for addition Headings are sometimes linked to other resources. Example(s) See the examples for h1, h2, and h3. * img --- Existing attributes alt height ismap src usemap width Rationale for addition It is incredibly common to have an image link to some other resource—a higher-resolution version, a resource of another medium (such as an image of a speaker linking to an audio file), or another web page. Example(s) href="picture22-hires.gif" alt="A picture of my face"> href="ringtone.mp3"> href="page27.html" src="next.gif" alt="Next page"> * ins --- Existing attributes cite datetime Rationale for addition Providing a link to more detailed reasoning about the insertion. This alone could be handled by the cite attribute, but the problem is that all of the linking semantics offered by the a element's attributes are lost. It is possible that both cite and href could be present with differing values. This would permit a citation of the whole work while linking to a section of the work, for example. In cases where a ins has differing values for cite and href, the href value should be used when the user activates the element. Example(s) href="http://blog.example.com/2008/06/04/sorry-hixie-i-was-on-drugs#p8" datetime="2008-06-04T23:45-04:00">I just lurrrve cats, especially little kitties. * kbd --- Rationale for addition There are circumstances in which a bit of keyboard input needs to be linked to explanatory information. This would be especially useful in "help" systems and tutorials for newcomers to a program (or computing in general). Example(s) If you want to access the console press href="where-is-the-tilde-key.htm">Tilde * legend ------ Rationale for addition There are circumstances in which the legend of a figure, fieldset, or other containing object should link to more information or a related resource. Example(s) href="/help/personalinfo.html">Personal information ... You do not have Java available, or it is disabled. href="/proj/java/clock.html">My Java Clock * li -- Existing attributes value Rationale for addition In many cases, most obviously the use of a list to contain a set of navigation links, list items are entirely filled by hyperlinks and no other content. Although the a elements may sometimes be useful for styling purposes, they are superfluous structural elements and could in some cases be replaced by linked list items. Example(s) ********** Navigation ********** * href="articles.html">Index of all articles* * href="today.html">Things sheeple need to wake up for today* * href="successes.html">Sheeple we have managed to wake* * mark ---- Rationale for addition Content which has been highlighted using mark may be served by creating a link to some resource which explains in more detail the reason for the highlighting. It also provides a method by which highlighting marks can refer to other parts of the same document. Example(s) href="#notes">An obstruction in a gate will prevent it from accepting a wormhole connection. * meter ----- Existing attributes high low max min optimum value Rationale for addition Meters will often benefit from being linked to resources which explain how the metered levels are determined, or to give more detailed information about the specific metering level being displayed. Example(s) href="/ranking.html#low">Low activity, Usenet, 66 subscribers href="/how-we-measure.html" min=0 max=20 value=12 title="centimeters">12cm * progress -------- Existing attributes max value Rationale for addition In a fashion similar to meter, progress indicators will in some cases need to be linked to more details about the thing whose progress is being tracked. This would be especially helpful in cases where there are multiple progress indicators on a single page, such as a download tracker. Example(s) href="details?thing=7">21% * - Existing attributes cite Rationale for addition To create a link to the source of the quoted material. This alone could be handled by the cite attribute, but the problem is that all of the linking semantics offered by the a element's attributes are lost here. Thus, for example, it is impossible to indicate the media type of a podcast, or the base language of a quoted article. It is possible that both cite and href could be present with differing values. This would permit a citation of the whole work while linking to a section of the work, for example. In cases where a has differing values for cite and href, the href value should be used when the user activates the element. Example(s) As Tim Berners-Lee said, href="http://example.com/quotes/tbl33.html"> "That idea of URL was the basic clue to the universality of the Web. That was the only thing I insisted upon." His best argument: href="http://lists.example.org/Archives/2008/Mar/71193#p22" cite="http://lists.example.org/Archives/2008/Mar/71193">I disagree! * samp ---- Rationale for addition Samples of output are often not enough to provide a full working knowledge of their causes and resolution. Linking to more information is often desirable in these circumstances. Example(s) The program responded with href="manual-error500.html">Error 500: Program had an error!, so I reverted the config file. * sub --- Rationale for addition Subscript elements often represent terms or concepts which may be unfamiliar to the reader; for example, in formulas. They can also be used to denote numeric systems which would benefit from being linked to more detailed explanations. Example(s) = Vhref="transverse.html">T - Vhref="radial.html">r 100href="binary.html">bin = 4href="decimal.html">dec * sup --- Rationale for addition Superscript elements are used to create footnote references, and those references are usually linked to the actual footnotes (with corresponding superscripted numbers in the footnotes that link back to the referencing text). Rather than having a sup wrapping an a element, it would make more sense to link the superscript itself. Example(s) It has been shown that the decline in pirates is directly correlated to the rise in global temperatures.href="#footnote-003">[3] * td -- Existing attributes colspan rowspan Rationale for addition In tables of data, each cell is often a small fragment of content summarizes more in-depth data. For example, a cell might contain a total dollar amount for a certain product or period of time (or both), or test results, or any number of other things. The ability to click on that cell and get a detailed breakdown of the figures that went into the presented content is highly valuable. Example(s) href="sales?product=a44">$27,924 href="benchmark?ua=ff&t=7">244ms * th -- Existing attributes colspan rowspan scope Rationale for addition Table headers can be cryptic in the interests of having small amounts of content. Being able to link from those cells directly to a legend (or key) explaining what they mean improves the usefulness of the table. Example(s) href="legend.html#PHA">PHA href="legend.html#O2V%">O2V % * time ---- Existing attributes datetime Rationale for addition There are two use cases here. The first is where time-based information may need to link to more detailed information; for example, the times in a public transportation schedule linking to more information about that route, station, or bit of the schedule. The other, which is already widespread, is the use of posting times as "permalinks" for both blog posts and comments on them. Example(s) href="http://meyerweb.com/eric/thoughts/2008/06/05/strengthening-links/">Thu 5 Jun 2008 1250 * tr -- Rationale for addition In tables of data, each row is often a grouping of information that summarizes more in-depth data. For example, a row of numbers showing income and expense totals for one month of the year could link to a detailed breakdown of that month's activity. The ability to click on the row to get to that information is highly valuable. Example(s) href="show_flow.php?month=200805"> ... href="sales?state=OH&product=722"> ... * var --- Rationale for addition A variable may be defined (in the sense of its role in a program being explained) away from mention of the variable, so linking to the definition assists in recall and learning. Less commonly, there may be a need to link to related material which explains the use of variables in general. Example(s) Here we pass the variable href="#var-loop">loop to the function. If there are href="what-is-n.html">n pipes leading to the ice cream factory then I expect at least flavours of ice cream to be available for purchase! * video ----- Rationale for addition It is a widespread convention that embedded video leads back to a main page or other resource describing more about the video (see, for example, any embedded YouTube or Vimeo video). Example(s) href="http://bostondynamics.com/content/sec.php?section=BigDog" autoplay controls> Possible Additions ------------------ These are the elements that seemed to be good candidates on the first pass, but upon further reflection failed to present obvious use cases. I'm open to suggestions. * article ------- Rationale for addition I'm not sure there's any reasonable case for linking an entire article. Example(s) ??? * caption ------- Rationale for addition I had thought that a caption could link to more information about the table in question, but that seemed better handled by linking the actual table itself. Example(s) ??? * dd -- Rationale for addition Sort of by definition (ah ha ha), the contents of this element should provide whatever information is needed—in other words, there shouldn't be a need to link to more detailed information. Example(s) ??? * details Those elements that already provide some form of linking via the href attribute, and so don't need extra linkability. Two—a and area—also have the attributes hreflang, media, ping, rel, target, and type. * a * area * base * link

  • Published Thursday 5 June 2008 16:09:18 UTC - Last updated Thursday 12 June 2008 19:00:57 UTC

    Like

  •  Help Eric Meyer Link Back to CSS3 Future from Premailer Inline Jungle AND HURRY BEFORE THE AMAZON LINK SIGNATURE EXPIRES on 1306587893...whenever the fuck that is... and p.s. When the fuck did links and imgs start EXPIRING? Is Amazon afraid it's gonna JUNK UP THE INTERNET TOO MUCH? HAHAHAHAHAHAHAHA ...»See Ya