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
#4
Both <div> and <span> is used to define parts of a web page. The <span> element shows the inline portion of a document. The <div> elements show a block-level portion of a document.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Describe the difference between cookies, sessionStorage, and localStorage. Kajal 3 16,264 07-15-2020, 12:00 PM
Last Post: RH-Calvin
  What is the difference between mysql_fetch_object() and mysql_fetch_array()? Kajal 1 3,530 07-15-2020, 11:55 AM
Last Post: RH-Calvin
  Difference between swing and AWT? beingchinmay 0 2,994 04-13-2016, 02:39 PM
Last Post: beingchinmay
  What is the difference between $message and $$message? beingchinmay 0 2,820 04-11-2016, 05:19 PM
Last Post: beingchinmay

Forum Jump:


Users browsing this thread: 1 Guest(s)