Friday, January 11, 2019

LAYOUT USING div ELEMENT :

LAYOUT USING div ELEMENT : 

<span style="font-size: x-large;">The div element is used in this layout it is a block level element used for grouping HTML elements.</span><span style="font-size: x-large;"><br /></span><span style="font-size: x-large;"><b><u>EXAMPLE</u></b> :</span><br />
<html>

<head>
<style>
#header {
    background-color:steelblue;
    color:white;
    text-align:center;
    padding:5px;
}
#nav {
    line-height:30px;
    background-color:#48D1CC;
    color:white;
    height:350px;
    width:110px;
    float:left;
    padding:5px;       
}
#section {
    width:350px;
    float:left;
    padding:10px;    
}
#footer {
    background-color:steelblue;
    color:white;
    clear:both;
    text-align:center;
   padding:5px;    
}
</style>
</head>

<body>

<div id="header">
<h1>BIG CATS</h1>
</div>

<div id="nav">
Tiger<br>
Lion<br>
Cheetah<br>
</div>

<div id="section">

<h2>Tiger</h2>

<p>
The tiger (Panthera tigris) 
is the largest cat species, 
reaching a total body length 
of up to 3.38 m (11.1 ft) over
curves and weighing up to 388.7
kg (857 lb) in the wild.

<p>
The tiger populations 
occurring in small pockets 
isolated from each other, of 
which about 2,000 exist on the
Indian subcontinent.
</p>

</div>

<div id="footer">
Copyright  2015
</div>

</body>
</html>

OUTPUT:-  
sk.

No comments:

Post a Comment

Internal Javascripts

Internal Javascripts :    The script code can be written directly into the HTML document. script code is placed in header of the docume...