
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
What is the difference between HTML tags and ?
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.
A div is a block-level element and a span is an inline element.
The div should be used to wrap sections of a document, while use spans to wrap small portions of text, images, etc.
Here’s an example:
<div>Demo Text, with <span>some other</span> text.</div>
The <div> element is used while creating CSS based layouts in html, whereas <span> element is used to stylize texts.
- Related Articles
- What is the difference between an acronym and abbr tags?
- What is the difference between text() and html() in jQuery?
- What is the difference between id and name attributes in HTML?
- HTML Deprecated Tags
- What are the essential tags for an HTML Document?
- Difference between HTML and HTML 5
- What are the most important tags for an HTML Document?
- Difference Between XML and HTML
- Difference Between HTML and CSS
- Difference Between HTML and ASP.
- Difference between JavaScript and HTML
- Difference Between RTF and HTML
- Difference between WML and HTML
- Difference between HTML and XHTML
- Remove and add new HTML Tags with JavaScript?
Advertisements
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.
A div is a block-level element and a span is an inline element.
The div should be used to wrap sections of a document, while use spans to wrap small portions of text, images, etc.
Here’s an example:
<div>Demo Text, with <span>some other</span> text.</div>
The <div> element is used while creating CSS based layouts in html, whereas <span> element is used to stylize texts.
- Related Articles
- What is the difference between an acronym and abbr tags?
- What is the difference between text() and html() in jQuery?
- What is the difference between id and name attributes in HTML?
- HTML Deprecated Tags
- What are the essential tags for an HTML Document?
- Difference between HTML and HTML 5
- What are the most important tags for an HTML Document?
- Difference Between XML and HTML
- Difference Between HTML and CSS
- Difference Between HTML and ASP.
- Difference between JavaScript and HTML
- Difference Between RTF and HTML
- Difference between WML and HTML
- Difference between HTML and XHTML
- Remove and add new HTML Tags with JavaScript?

Advertisements