Simple Website Layout Tutorial Using HTML 5 and CSS 3

Simple Website Layout Tutorial Using HTML 5 and CSS 3

As most of us know HTML 5 has created a big buzz on internet and is sure to give Adobe a hard time. Apple believes that HTML5 is what will define the web and would love to see more developers adopt it instead of Flash.

Now that big video sites such as YouTube are testing support for HTML5 (Mashable).

HTML 5 is a breakthrough which will improve the sites from design view point, seo etc.

It when combined with css3 can make amazing web sites.

The Most prominent additions in HTML 5 are tags like <header>, <footer>, <aside>, <nav>, <audio> etc. HTML 5 will also include APIs for drawing graphics on screen, storing data offline, dragging and dropping, and a lot more . Site layout would be easily understandable and in code, tags are easy to understand as well Like the few tags i listed above clearly explains that :

  • <header> = Header (Head area of the site)
  • <nav> = Navigation (Menu/Navigation Area)
  • <footer> = Footer Area
  • <aside> = An area on a side (Side Bar)

Simple HTML 5 Tutorial

We will make a very very Simple web page with HTML 5 and styling with CSS 3. This is how the final result will look like :

Final HTML 5 Tutorial Result

Starting HTML Tutorial Code:

The Structure would be like this :

<!Doctype html>
<html lang="en">
<title>Your Page title</title>
<!-- Define Header -->
<!-- End Header -->
<!-- Define Navigation/Menu -->
<!-- End Navigation -->
<!-- Main content area -->
<!-- End of Main content area -->
<!-- Sidebar -->
<!-- End Sidebar -->
<!-- Footer -->
<!-- End of Footer -->

Defining Header Tag:

<h1>HTML 5 Tutorial Sample </h1>

Doctype and Html Lang Added. Thanks for the suggestion Mark for correcting validation.

Defining Navigation Area with Few links in it:

<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Feedback</a></li>
<li><a href="#">Contact</a></li>

Stylizing the Navigation with CSS3 for Rounded Corners:

nav {
border-radius:10px; //for opera
border:1px solid #cccccc;
nav ul {
margin:0 auto;
nav ul li {
nav ul li a{

You can Also use px in Nav width instead of %. In this tutorial’s case you can add width=”960px” .


Then we Defined a DIV for the main content area and in it defined <section> and <article> area where the main content of the page is (the two paragraphs). You can see details in the source with comments for better understanding. The image inserted is also a simple div with css3 in it to show the image in background and rounded corners.

After that comes a very handy and prominent new addition in HTML 5. The <aside> tag which works like a sidebar without any extra css to move it on a side.

Defining Sidebar <aside>:

<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Feedback</a></li>
<li><a href="#">Contact</a></li>

The UL (unordered list ) is repeated three times in the code.  Its just for giving an idea how sections will look like and links are dummy as well you can put blogrolls, categories etc. anything you like.

Defining the Footer:

<section>Anything you want to put in footer goes here. </section>

Stylizing the Footer:

border-top:1px solid #cccccc;
border-radius:5px; // for Opera

What’s Covered so Far:

  • So far we have learned how to make simple HTML 5 Tags Layout
  • Understanding of the Tags and their behaviors
  • CSS3 for Rounded Corners and Text