Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difference between div and span?
#1
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.




DIV Tag

:
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.
4.by default, a line-
break is placed before and after this element
Reply
#2
<div> is used with parts of the website, i.e. header, content, image, sidebar, gadget.
<span> is useful for working with fonts.
Reply
#3
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.
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)