Press "Enter" to skip to content

Starting Blogging For HTML5 and CSS3

I started blogging with Oracle Forms and Plsql examples then also started blogging for Blogger tips and tricks and now after a lot of thinking, I am going to start blogging for HTML5 and CSS3 for web developers and bloggers to get hopefully more visitors and more pages views :)… just joking, I know it is not that easy.

So lets start, here is the first example I am starting for HTML5.

HTML5 The Main Structure

First, the DOCTYPE:
<!doctype html>
That’s it. No URLs that even the most prolific web authors need to cut and paste. Note that there is no version number. That’s all. It’s not so much an instruction as an incantation: it’s required by browsers that need the presence of a doctype to trigger standards mode, and this string is the shortest string that does this reliably.
Unless you can think of a splendid reason not to use it, I recommend UTF-8 as the character encoding:
<!doctype html>
<meta charset=utf-8>

Take a look at that <meta> tag very carefully. Those who are used to writing XHTML will notice three oddities. The fi rst is that the <meta> tag is much shorter than that we have used up until now—we’ve been used to using <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8”>. This is still possible, but the shorter way is preferred as it’s easier to type and works everywhere already. You’ll also notice that I haven’t quoted the attribute charset=”utf-8”. Neither have I self-closed the tag <meta charset=utf-8 />.

So, in the interest of maintainability, we’ll add those optional elements to make what’s probably the minimum maintainable HTML5 page:

<!doctype html>
<html lang=en>
<meta charset=utf-8>
<title>Interesting blog</title>
<p>Today I drank coffee for breakfast. 14 hours later, I went to bed.</p>