
A Preview of HTML 5 on A List Apart.
Lachlan Hunt wrote an article on A List Apart on HTML 5. It is the fifth major revision of the core language of the World Wide Web, HTML. HTML 5 specifies two variants of the same language, a “classic” HTML (text/html) variant known as HTML5 and a XHTML variant known as XHTML5.
One of the major additions to HTML5 is that there are new elements and attributes being added to the language, such as <header>, <footer>, <section>, <article>, <aside> and etc (they’re pretty much self explanatory). Such tags does not only make web browsing more convenient to those who’re visually impaired as well as making easier for search engines to index your site content (think <h1>, <h2> and etc), they represent elements commonly found in modern webpages.
In addition, you can embed audio and video files with the less clunky <audio> and <video> tags, without the hassle of using <embed>. Woots!
Good news and bad news for you when HTML 5 comes along. Let’s start with the one big bad news – deprecated elements such as <font>, <center> and <strike> have been dropped, meaning that they will not only invalidate your webpage, but future web browsers that are reading pages using HTML 5 will not be able to parse the dropped elements. But that’s okay, since according to the current XHTML standards, they’re not recommended too.
- <font> can be replaced using
<span style="css properties">text</span>. - <center> can be replaced using
<p style="text-align: center;">text</p>. - <strike> can be replaced using
<span style="text-decoration: line-through;">text</span>.
And the really, really good news to all – even if you use UPPERCASE letters for your coding, your website will still be HTML 5 valid, a departure from the current strict XHTML standards where all tags have to be in lowercase. So <IMG SRC="image.jpg" /> is equivalent to <img src="image.jpg" />. However, I still love lower case tags because they’re easier on the eyes than blocky caps. Cheers for those who adore capitalised tags!
For more details, there’s a Wikipedia entry on HTML5 too!



















nice one. but still, i’m not good in using H1 / H2.. mostly, everything will be DIV / SPAN.. haha
Check out abdusfauzi’s latest blog post » Nuxy Tape : My iTunes Playlist on the Net.
@abdusfauzi: Oh. Actually it’s good practise to start using the proper headings – they’re part of the semantics that define HTML/XHTML and they help a lot to present your site when your CSS stylesheet is taken out. Basically search engine indexes your site the way you see it without any stylesheet on. The H1 will have the largest font, followed by H2 and H3 until H6 – and the size is representative of the hierarchical organisation of headers.
Usually the only H1 element in a blog should be the blog title, and then H2 for the post titles, H3 for the sidebar headings (some will still use H2) and etc. It tells the search engine a lot about your site structure and makes indexing of your content easier.
Using proper heading is something like a good practice of adding ‘;’ after the last line of a CSS attribute (although it’s not required).