Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

What is the difference between div and span?

Ads
banner
banner
banner
superman Offline referral

Posts: 61
Joined: Jul 2014
Reputation: 0

#1
Member
Can anybody dive me an explanation to understand the difference between HTML code div and span how to use them?
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#2
Support Team
The difference is in the way they are displayed. In standard HTML div is a block-level element where span is an inline element.

This means that a span tag won't support in many cases some CSS properties like for instance margin.
Paripoorn Offline referral

Posts: 4
Joined: Feb 2015
Reputation: 0

#3
Junior Member
DIV is a block level element that means you can create a block with the help of DIV where inside you can add multiple elements including other DIVs while SPAN works on just a specific part of something. Like in a text line you want to bold only few words, you use SPAN here. SPAN do no support all the properties but still very useful in some cases.
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#4
Support Team
If you have 2 divs they will display one under the other unlike spans that will display inline unless you add a brake!
evathomsan Offline referral

Posts: 340
Joined: Feb 2015
Reputation: 4

#5
Senior Member
In simple words span is used for dividing div into pieces. Div uses for creating a block on web page, where span uses for diving that div further.
k2bsolutions Offline referral

Posts: 3
Joined: Jan 2015
Reputation: 0

#6
Junior Member
Div tag are the block of code and span tag is div to diving another action of code.
rahhulkumar1 Offline referral

Posts: 53
Joined: Oct 2015
Reputation: 1

#7
Member
Both div and span are HTML elements act as a container. DIV is ablock level element but SPAN is a inline element. DIV will create new line but SPAN will not create new line. SPAN is a light weight container but DIV is heavy weight container.





User(s) browsing this thread: 1 Guest(s)