What is the difference between span and div

0 votes
What tag should i used in order to wrap sections of a document. Can someone explain the main difference between them.
Jan 16, 2020 in Web Development by anonymous
• 37,520 points

recategorized Jan 21, 2020 by Niroj 3,577 views
div : has display type block and takes right and left space and starts in new dive.we can add padding and margin in all sides

span: has display inline and dont start in new line.we cannot add top and bottom padding but left and right can be added.

Hi @kulkarniradnyas17@gmail.com, 

Thank you for your contribution to the Edureka Community.

Register/Sign up on the community to gain points for further contributions. You may ask questions, answer, upvote, and downvote an answer. Each of these would fetch you points and you could be among the top contributors and win exciting merchandise from Edureka. 

1 answer to this question.

0 votes

The div should be used to wrap sections of a document, while use spans to wrap small portions of text, images, etc. 

The <div> element is used while creating css based layouts in html, whereas <span> element is used to stylize texts.

answered Jan 16, 2020 by Niraj

edited Jan 21, 2020 by Niroj

Related Questions In Web Development

+1 vote
9 answers

What is the difference between web design and web development?

A designer designs the web pages and ...READ MORE

answered Jan 22, 2020 in Web Development by Niroj
• 82,880 points
2,093 views
0 votes
1 answer

What is the difference between JavaScript and jQuery?

JavaScript is an independent language and can ...READ MORE

answered Jun 27, 2022 in Web Development by rajatha
• 7,680 points
640 views
0 votes
0 answers

what is the difference between jquery-1.8.2.js and jquery-1.8.2.min.js

i find a topic about difference between ...READ MORE

Aug 19, 2022 in Web Development by gaurav
• 23,260 points
686 views
0 votes
0 answers

What is the difference between margin and padding in CSS?

What is the difference between margin and ...READ MORE

3 days ago in Web Development by Nidhi
• 1,720 points
16 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,470 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,250 points
2,826 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,350 points
892 views
0 votes
1 answer

How many methods of including css in an HTML document?

Hello fignithi, yes!!,you can use external file for css ...READ MORE

answered Jan 16, 2020 in Web Development by Niraj

reshown Jan 16, 2020 by Sirajul 2,045 views
0 votes
1 answer

What does cors means in Angularjs and what the use of it?

CORS is Cross Origin Resource Sharing which means you ...READ MORE

answered Jan 29, 2020 in Web Development by kartik
• 37,520 points
4,259 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP