Thursday 19 April 2012

New Tags in HTML 5.0-Part1


Article:

The <article> tag is supported in Internet Explorer 9, Firefox, Opera, Chrome, and Safari.

Note: Internet Explorer 8 and earlier versions, do not support the <article> tag.

The <article> tag specifies independent, self-contained content.

An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.

Potential sources for the <article> element:
  • Forum post
  • Blog post
  • News story
  • Comment
<html>
<body>
<article>
  <h1>Internet Explorer 9</h1>
  <p>Windows Internet Explorer 9 (abbreviated as IE9) was released to
  the  public on March 14, 2011 at 21:00 PDT.....</p>
</article>
</body>
</html>

Result:

aside:

The <aside> tag is supported in Internet Explorer 9, Firefox, Opera, Chrome, and Safari.
 Note: Internet Explorer 8 and earlier versions, do not support the <aside> tag.

The <aside> tag defines some content aside from the content it is placed in.

The aside content should be related to the surrounding content.

<!DOCTYPE html>
<html>
<body>
<aside style="font-size:larger;font-style:italic;color:green;float:right;width:120px;">
70% of the world's reefs will be destroyed over the next 40 years.
</aside>
<p>Global warming is affecting coral reefs all over the world. At the current rate, 70% of the world's reefs will be destroyed over the next 40 years.</p>
</body>
</html>
 

Result:
Audio:

The <audio> tag is supported in Internet Explorer 9, Firefox, Opera, Chrome, and Safari.

Note: Internet Explorer 8 and earlier versions, do not support the <audio> tag.

The <audio> tag defines sound, such as music or other audio streams.

<!DOCTYPE html>
<html>
<body>
<audio controls="controls">
  <source src="song.ogg" type="audio/ogg" />
  <source src="song.mp3" type="audio/mp3" />
  Your browser does not support the audio element.
</audio>
</body>
</html>

Result:




Bdi:

The <bdi> tag is currently supported only in Firefox and Chrome.

bdi stands for Bi-directional Isolation.

The <bdi> tag isolates a part of text that might be formatted in a different direction from other text outside it.

This element is useful when embedding user-generated content with an unknown directionality.

<!DOCTYPE html>
<html>
<body>
<ul>
 <li>User <bdi>hrefs</bdi>: 60 points</li>
 <li>User <bdi>jdoe</bdi>: 80 points</li>
 <li>User <bdi>إيان</bdi>: 90 points</li>
</ul>
</body>
</html>

Result:


No comments:

Post a Comment