Previous | Home | Next |
A HTML Blocks is a standard block used to add text, multimedia, widgets etc to a site front page or course page. The title bar may be left blank if desired. There are two type of HTML Elements define as given below:
- Block Elements
- Inline Elements
Block level elements is used as a start(and end) with a new line and show on web browsers.
Example
<p>, <h1>,<h2>,<h3>, <h4>,<h5>,<h6>, <ul>,<ol>, <dl>, <pre>,<hr>,<blockquote>, and <address> .
Inline elements are used to displayed without line breaks.
Example
<b>,<td>,<a>,<img>,<em>,<strong>, <sup>, <sub>, <big>, <small>, <li>, <ins>,<del>,<code>,<cite>, <dfn>,and <kbd>.
- The HTML <div>Element
- HTML <span> Element
The HTML <div>Element
The <div> element has used a style and class will be display on the browser in the line breaks before and after it together with CSS.
HTML <span> Element
In the HTML <span> Element is used in inline element.
<!DOCTYPE html>
<html>
<body>
<h1>This is my <span style="color:blue">www.r4r.co.in</span> website.</h1>
</body>
</html>
Output :
<!DOCTYPE html>
<html>
<head>
<style>
#header {
background-color:MediumSlateBlue;
color:white;
text-align:center;
padding:5px;
}
#nav {
line-height:30px;
background-color:coral;
height:300px;
width:100px;
float:left;
padding:5px;
}
#section {
width:350px;
float:left;
padding:10px;
}
#footer {
background-color:MediumSlateBlue;
color:white;
clear:both;
text-align:center;
padding:15px;
}
</style>
</head>
<body>
<div id="header">
<h1>I LOVE MY INDIA</h1>
</div>
<div id="nav">
DELHI<br>
PUNJAB<br>
RAJISTAN<br>
</div>
<div id="section">
<h2>PUNJAB</h2>
<p>
Punjab is the wellspring of Indian culture. Traditional literature the
Ramayana and Mahabharata, the Puranas, the Vedas, all take us back to Punjab.
Archaeolgiststs find the earliest evidence of recognisably Indian civilisation
in the excavation of Punjab's Harappan sites. The uninterrupted continuity of
Indian culture flows forth from ancient Punjab.
</p>
<p>
Punjab is land of five rivers in North West India and North East Pakistan.
Punj means five and aab means water, so punjab means five waters.
These five rivers that run through punjab, having their originating
source as various small lakes in Himalayas.
</p>
</div>
<div id="footer">
Copyright © www.r4r.co.in
</div>
</body>
</html>
Output :
Previous | Home | Next |