<DIV>.... </DIV> Tag - Generic Block Container.

22 Feb 2009, dilip Comments: | Views: 214 | | Category: Html tags

Click On the Stars to Rate:
  • Currently 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
0

The DIV element defines a generic block-level container, allowing authors to provide style or language information to blocks of content. The element may contain any inline or block-level element, including another DIV.

Syntax <DIV>...</DIV>
Attribute Specifications
Contents Inline elements, block-level elements
Contained in PPLET, BLOCKQUOTE, BODY, BUTTON,CENTER, DD,DEL, DIV,FIELDSET,FORM,IFRAME,INS,LI,MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The DIV element is most useful when it is used with class and ID, and stylesheets. Below is a small example showing how to use DIV with Class and ID

<html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>This is the title of Your Page </title> </head>
<body> write any thing here ..blah .. blah... it will be displayed in your webpage
<style>
div.dilip{
background:"#E8F8FF";
border:6px solid #938262;
}
div#kum{
background:"#EEE";
border:6px solid #EFF890;
}
</style>
<div class="dilip">This is First div block with some text </div>
<div id="kum">This is second. </div>
</body>
</html>

In the above code inside STYLE tags the id is represented by '#' and class by '.' . Thus using CSS div can be used for layout of page. It is the most commonly used tag of the webmasters. It can contain other block level elements like table another DIV etc. Please partcipate in our Web Designing Forums, to know more and discuss -- Please Click Here

        Subscribe RSS Feed Of Our Blog
Comments: 0

Web Designing Home Page

Related Articles

Web Design » Html tags

<DIV>.... </DIV> Tag - Generic Block Container.
<H1>...</H1> The Heading Level One
<table>
<img> tag
<a> anchor Tag

Share This Page

Catch All World Cup Action ,Videos of Highlights, Live Score

RSS Feed

 Subscribe Our RSS Feed

 

Follow dilipkumar_in on Twitter

 

Random Link