Hello guys.
I want to know whats the difference between a div and a span tag?
Thanx in advance.
Hello guys.
I want to know whats the difference between a div and a span tag?
Thanx in advance.
<div> is a block element. <span> is a inline element. The difference between block element and inline element is that block element will change to a new line to display.
But you can use the CSS {display:block} or {display:inline} to change the behavior of inline element to block one and block element to inline one.
<span> and <div> tags both allow a Web designer to style text and add other formatting attributes to their Web page. They are not interchangeable tags, though. <div> tags are block-level elements, whereas <span> tags are not. This article explains this, and other differences, between <span> and <div> tags.
I think so do not know whether the correct?
The ‘div’ and the ’span’ tags are quiet frequently used tags in HTML. The proper understanding of these tags are very much important for a web HTML developer.This article is shows what are the characteristics of both these tags. Understanding the difference between both tags will help to use them in appropriate place.
Bookmarks