» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with HTML + html5

HTML 5

W3C: Del.icio.us W3C Tags

HTML 5 data- elements to store private values

John Resig goes into more detail on the HTML 5 data- elements that gives developers a valid place to store metadata:

This allows you to write valid HTML markup (passing an HTML 5 validator) while, simultaneously, embedding data within your page. A quick example:

HTML:
  1.  
  2. <li class="user" data-name="John Resig" data-city="Boston"
  3.      data-lang="js" data-food="Bacon">
  4.   <b>John says:</b> <span>Hello, how are you?</span>
  5. </li>
  6.  

Which you can get at via some simple code:

JAVASCRIPT:
  1.  
  2. var user = document.getElementsByTagName("li")[0];
  3. var pos = 0, span = user.getElementsByTagName("span")[0];
  4.  
  5. var phrases = [
  6.   {name: "city", prefix: "I am from "},
  7.   {name: "food", prefix: "I like to eat "},
  8.   {name: "lang", prefix: "I like to program in "}
  9. ];
  10.  
  11. user.addEventListener( "click", function(){
  12.   var phrase = phrases[ pos++ ];
  13.   // Use the .dataset property
  14.   span.innerHTML = phrase.prefix + user.dataset[ phrase.name ];
  15.  
  16.   // OR, to work with old browsers
  17.   //span.innerHTML = phrase.prefix + user.getAttribute("data-" + phrase.name );
  18. }, false);
  19.  

Using data- is a very practical solution, but people in the comments of John's post would much prefer a more "pure" solution. There are the "Just use XML namspaces" crowd, and the "define the data outside of the page" group, and the "use an XML island" folk. What are you?

Ajax: Ajaxian

HTML 5 differences from HTML 4

W3C document which summarizes differences between HTML 4 (and by implication XHTML 1) and HTML 5. Last accessed as a working draft updated 9th June 2008.

W3C: Del.icio.us W3C Tags

HTML 5 differences from HTML 4

<dt> Costello <dd> Look, you gotta first baseman? <dt> Abbott <dd> Certainly. <dt> Costello <dd> Who's playing first? <dt> Abbott <dd> That's right. <dt> Costello <dd> When you pay off the first baseman every month, who gets the money? <dt> Abbott <dd> Ev

W3C: Del.icio.us W3C Tags

HTML 5の最新草案が公開 | Web標準Blog | ミツエーリンクス

html10.0くらいになったらCSSとかいらない新世界になってるはず。

W3C: Del.icio.us W3C Tags

HTML 5 differences from HTML 4

header represents the header of a section.

W3C: Del.icio.us W3C Tags

Page 1 | Next >>