Pages

Sunday, March 18, 2012

Division Tag - Span Tag


Division Tag
  • Div is Short Form of Division Tag.
  • The <div> element defines logical division within the document.
  • These means when you see or use a div tag, you are indicating that the enclosed content is a specific section of the webpage.
  • Now a day’s instead of table <div> tag is used more prominently as it is SEO friendly and also makes the coder job easier.
  • Div is a Block Level Element / Content .
  • <div> tag is not a replacement of the <p> tag.
  • <p> tag is for paragraph, <div> tag is for more general division within a document.
  • <div> element is typically used in XHTML and CSS documents to Position portion of the page.

Span
  • <span> tag has similar property of <div> tag the only difference is it changes the style of the text it encloses.
  • Span tag goes to finer level so we can span to format single character if needed.
  • It is not a block level content.

No comments:

Post a Comment