Changes To The B Element in HTML5

The b element is used to display bold text. It is a presentational element. Although, this element has been changed, as follows…

From w3.org…

Although previous versions of HTML defined the b element only in presentational terms, the element has now been given the specific semantic purpose of representing text “offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is bold text”.

Here is an example…

<p>I <b>love</b> the change to this element.</p>

The New Audio Element in HTML5

This element represents and audio stream. It is a transparent element. You won’t see it visually on the page.

There are also some attributes, other than the global attributes, that can be added to it. Such as autoplay, preload, controls, loop, mediagroup, and src.

It also can contain certain element. Such as source and track.

Here is an example…

<audio autoplay>
    <source src="some_audio.mp3">
</audio>

The New Aside Element in HTML5

An aside is a temporary departure from the current theme or topic. Here’s an example…

<aside>Going off on a tangent.</aside>

The New Article Element in HTML5

From w3.org

The article element represents a section of content that forms an independent part of a document or site; for example, a magazine or newspaper article, or a blog entry.

Here’s an example…

<article draggable="true">my article about the article element should go here</article>

HTML5 Changes to the A Element

There are a few changes to elements and new elements in HTML5. One of those elements is the a element, or anchor element. It’s used to create hyperlinks. There are a few changes to this element.

  1. The name attribute is obsolete.You can no longer use something like…

    <a name="whatever"></a><div>Some content.</div>

    Instead, put an id on the nearest container…

    <div id="whatever">Some content.</div>

  2. The target attribute has changed.This used to be deprecated, but now it’s not. Go ahead and use it.

    <a href="http://blog.strimble.com/" target="_blank">blog</a>

  3. There is a new media attribute.This is the type of media that the destination of the hyperlink was designed for.

    <a href="http://blog.strimble.com/" media="screen">blog</a>