GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Web  >  Html
Go To First  |  Previous Question  |  Next Question 
 Html  |  Question 29 of 38    Print  
What is DIV in HTML?

  
Total Answers and Comments: 3 Last Update: July 30, 2007     Asked by: StephenRaj 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 02, 2007 07:43:13   #1  
varun        

RE: What is DIV in HTML?
DIV IS SAME AS SPAN BUT IT HAS AN ADDITIONAL PROPERTY OF ALIGN IN IT WITH THE HELP OF WHICH WE CAN ALIGN THE TEXT WITHIN IT,FURTHER IF WE WANT TO PLACE OUR CODE ANYWHERE IN OUR PAGE WE USE DIV TAG AND OUR CODE WITHIN IT.
 
Is this answer useful? Yes | No
April 03, 2007 01:54:45   #2  
jbanx Member Since: February 2007   Contribution: 38    

RE: What is DIV in HTML?
Description of the DIV Tag:

The <div> tag in XHTML is a tag that defines logical divisions within the content of a page. What this means is that a <div> tag defines sections of a Web page to make it easier to manage, style, and manipulate. You can use the <div> tag when you want to center a block of content or position a content block on the page. The <div> tag is a very powerful tool for Web developers.

HTML Definition of the DIV Tag:

In order to use the <div> tag you need to know the HTML definition of the <div> tag. Some key tips:

  • The <div> tag is a block-level element
  • The <div> tag can contain nearly any other tag
  • The <div> tag cannot be inside <p> tags
Tips for Using the DIV Tag:
  • The <div> tag is not a replacement <p> tag. The <p> tag is for paragraphs, only, while the <div> tag defines more general divisions within a document. Don't replace <p> tags with <div> tags.
  • It's a good idea to label your <div> tags as you place them in your document. For example, if you're defining the main content area of your site, you should name that DIV tag: "maincontent". <div id="maincontent">
  • It's always a good idea to close your <div> tags as soon as you open them. Then place the contents within the element.
  • If you nest your <div> tags, be sure that you know where your content is going (in other words, which DIV it should be part of).

 
Is this answer useful? Yes | No
July 30, 2007 15:28:18   #3  
Sujatars Member Since: December 2006   Contribution: 217    

RE: What is DIV in HTML?

The <div> tag defines a division/section in a document


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape