What is the difference between DIV and SPAN? - ProProfs Discuss
Topics-
Products +
     

What is the difference between DIV and SPAN?

Asked by B. Wright, Last updated: Sep 02, 2019

+ AnswerRequest Answer
...

2 Answers

A. Cook

Find happiness in writing new things.

A. CookEnglish Professor, M.A, Ph.D, Kentucky
English Professor, M.A, Ph.D, Kentucky

Answered on Sep 02, 2019

HTML that is hypertext markup language, is a structured code used in building and displaying the web pages that we visit online on any device at any time. DIV and SPAN are HTML tags which define elements in HTML code. Other programming languages and technologies can be interlocked or integrated with HTML to produce advanced and dynamic features on a website. HTML is a text file that uses the syntax (specific code) to define a page's content, format, style, and layout. The term "markup" signifies the code or text that is being prepared for presentation and processing in a web browser, or on a web page.

With the CSS advances combined with the enhancements, and some new elements, some specific elements can be used in another way which is even better than before, making web pages to have more, faster, and beautiful features to look at; certain elements like DIV can be replaced when overly used, with CSS used with HTML 5. The SPAN element is an inline element. It doesn't break into lines except the break tag is used, and the content between the open and close tags is shown as a line by default.

 Reply

W. Wright

Let's see how far my knowledge stretches

W. WrightBiology student, Biology student, Astoria
Biology student, Biology student, Astoria

Answered on Aug 22, 2019

The critical difference between DIV and SPAN is that DIV is a block-level element while SPAN is an inline element. The DIV tag is a vessel for other elements, while the span tag is used as a container for some text. The DIV tag begins with a new line; however, the SPAN tag does not start with an original path.

The DIV tag will take all width, and the SPAN tag will only take the required width. The SPAN tag is an inline element in HTML. The DIV is an HTML tag which defines a division or a section of an HTML document.

 Reply

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.