Semantic HTML5 Across All Browsers (and without Javascript)

HTML5 and it’s new semantic elements give developers a much larger toolset to give meaning to your HTML.  As usual, IE6 almost ruins it for
everybody 🙂  Fortunately, there is a way for the new semantic elements like section, article and aside to be used and still work with any browser.  It excludes
the need for the shim javascript file as well, enabling your site to be
compatible with the approximate 10% of users who disable javascript.

To use an element such as section, write your code like below.

<section>
<div class=”section”>lorem ipsum …</div>
</section>

You then add css styling to the div class, rather than the element.

.section
{
font-size: 11pt;
}

Advertisements
This entry was posted in Technical and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s