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

Thread: 

What is the difference between div and span?

Ads
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,518
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,518
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: 336
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.
damponting44 Offline referral

Posts: 277
Joined: Oct 2016
Reputation: 0

#8
Senior Member
The distinction amongst traverse and div is that a traverse component is in-line and generally utilized for a little piece of HTML inside a line, (for example, inside a section) though a div (division) component is square line (which is fundamentally proportional to having a line-break prior and then afterward it) and used to bunch bigger lumps of code.
HokuApps Offline referral

Posts: 14
Joined: Oct 2017
Reputation: 0

#9
Junior Member
The difference between span and div is that a span element is in-line and usually used for a small chunk of HTML inside a line (such as inside a paragraph) whereas a div (division) element is block-line (which is basically equivalent to having a line-break before and after it) and used to group larger chunks of code.
damponting44 Offline referral

Posts: 277
Joined: Oct 2016
Reputation: 0

#10
Senior Member
The distinction amongst traverse and div is that a traverse component is in-line and typically utilized for a little piece of HTML inside a line, (for example, inside a section) though a div (division) component is square line (which is fundamentally comparable to having a line-break previously, then after the fact it) and used to aggregate bigger lumps of code.





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