Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difference between div and span?
The ‘div’ and the ‘span’ tags are quie t frequently used tags in HTML. The proper understanding f these tags are very much important for a web HTML developer.This article is shows what are the characteristics of both these tags. Understanding the difference between both tags will help to use them in appropriate place.


1.As the name indicates, the div tag defines a ‘division’ in a web page.
2.div is a block-element; its default display value is “block”.
3.div tag is commonly used while creating Css based layouts in html. default, a line-
break is placed before and after this element
<div> is used with parts of the website, i.e. header, content, image, sidebar, gadget.
<span> is useful for working with fonts.
This is what I know about these two: In defining a division or section in an HTML, you may use DIV and while you use SPAN to group inline-elements in a document.

Possibly Related Threads...
Thread Author Replies Views Last Post
  What is the difference between mysql_fetch_object() and mysql_fetch_array()? Kajal 0 1,006 08-08-2017, 03:33 PM
Last Post: Kajal
  Describe the difference between cookies, sessionStorage, and localStorage. Kajal 2 3,181 07-01-2017, 10:22 PM
Last Post: robert4u
  Difference between swing and AWT? beingchinmay 0 1,306 04-13-2016, 02:39 PM
Last Post: beingchinmay
  What is the difference between $message and $$message? beingchinmay 0 1,211 04-11-2016, 05:19 PM
Last Post: beingchinmay

Forum Jump:

Users browsing this thread: 1 Guest(s)