The webpage layout is used to design the webpage better look, most of the websites take the help of the css and javascript to design the webpage layout more attractive, In this tutorial we are going to design the layout using only HTML
The simplest way of creating the website layout is by using tables
, In order to create the webpage layout we need the header, footer and body sections in the webpage
<h2 style="color:blue"><i> HTML Layout</i></h2> <table width="500" border="0"> <tr> <td colspan="2" bgcolor="violet"> <h1 style="color:black">TechFunda online Tutorials</h1> </td> </tr> <tr> <td bgcolor="green" width="250" height="150"> <b style="color:lime">Tutorials</b><br /> HTML<br/> CSS<br/> JavaScript<br /> AngularJS<br/> BootStrap<br/> </td> <td bgcolor="pink" width="250" height="150"> Learn Online tutorials in techfunda in step by step manner with explanations </td> </tr> <tr> <td colspan="2" bgcolor="black"> <center style="color:whitesmoke"> For more details Visist www.techfunda.com </center> </td> </tr> </table>
header
, body
, footer
section by using tables in html, We have taken the table width
as 500
header
section in the row as <tr>
which is created in the <td>
as Techfunda online tutorials
second row(body)
we are having the two
colums as in the first column we are having the tutorials and in the second column
we are having the description of the techfundathird row (footer)
we are havig the details of the techfunda
and with the given visited linkoutput
We can create the layout of the html by using multiple columns
<h2 style="color:blue">HTML layout using multiple columns</h2> <table> <tr valign="top"> <td bgcolor="blue" width="20%"> <b>Tutorials</b><br /> HTML<br /> CSS<br /> Javascript </td> <td bgcolor="red" height="200"> TechFunda is the best online tutorials </td> <td bgcolor="green"> <b>Refer and Earn </b><br /> Csharp<br /> AngularJS<br /> Asp.Net </td> </tr> </table>
HTML layout using multiple columns
In the above code snippet we have defined the HTML layout using multiple columns
We have single row to create the three columns we have taken the row as <tr>
and columns as three to define the layout
output
We can create the HTML layout using div
<h2>HTML layout using div </h2> <div> <div style="background-color:green; width:100%"> <h1>This is header in the page</h1> </div> <div style="background-color:orange; height:200px;width:100px;float:left;"> <div><b>Main Menu</b></div> AngularJS<br /> Asp.Net<br /> Java </div> <div style="background-color:violet; height:200px;float:left;"> <p>This is body in the page</p> </div> <div style="background-color:lightyellow; height:200px;float:right;"> <div><b>This is HTML layout</b></div> HTML<br /> PHP<br /> PERL... </div> <div style="background-color:blue;clear:both"> <center> Am called Footer in the page </center> </div> </div>
div
, we can create the HTML layout page using div, span.
header
section using divbody
section using div, we have created three columns in the div using the single row footer
section using the div by using <td>
output