
A webpage layout is very important to give better look to your website. It takes considerable time to design a website's layout with great look and feel.
Now a days, all modern websites are using CSS and Javascript based framework to come up with responsive and dynamic websites but you can create a good layout using simple HTML tables or division tags in combination with other formatting tags. This chapter will give you few examples on how to create a simple but working layout for your webpage using pure HTML and its attributes.
HTML Layout - Using Tables
The simplest and most popular way of creating layouts is using HTMLtag. These tables are arranged in columns and rows, so you can utilize these rows and columns in whatever way you like.
Example
For example, the following HTML layout example is achieved using a table with 3 rows and 2 columns but the header and footer column spans both columns using the colspan attribute:HTML Layout using Tables
This is Web Page Main title |
|
Main Menu HTML PHP PERL... | Technical and Managerial Tutorials |
|
This is Web Page Main title |
|
Main Menu HTML PHP PERL... |
Technical and Managerial Tutorials |
Multiuple Columns Layout - Using Tables
You can design your webpage to put your web content in multiple pages. You can keep your content in middle column and you can use left column to use menu and right column can be used to put advertisement or some other stuff. This layout will be very similar to what we have at our website tutorialspoint.com.Example
Here is an example to create three column layout:Three Column HTML Layout
Main Menu HTML PHP PERL... | Technical and Managerial Tutorials | Right Menu HTML PHP PERL... |
Main Menu HTML PHP PERL... |
Technical and Managerial Tutorials | Right Menu HTML PHP PERL... |
HTML Layouts - Using DIV, SPAN
The
element is a block
level element used for grouping HTML elements. While the
tag is a block-level element, the HTML element is used for
grouping elements at an inline level.
Although we can achieve pretty nice layouts with HTML tables, but tables weren't really designed as a layout tool. Tables are more suited to presenting tabular data.
Note: This example makes use of Cascading Style Sheet (CSS), so before understanding this example you need to have a better understanding on how CSS works.
Example
Here we will try to achieve same result using
tag along
with CSS, whatever you have achieved using
tag in previous example.
tag in previous example.
This will produce following result:HTML Layouts using DIV, SPAN This is Web Page Main title
Main MenuHTML PHP PERL...Technical and Managerial TutorialsRight MenuHTML PHP PERL...Copyright © 2007 Tutorialspoint.com
This is Web Page Main title
Main Menu
HTMLPHP
PERL...
Technical and Managerial Tutorials
Right Menu
HTMLPHP
PERL...
Post a Comment
0 comments
Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you.