HTML BASICS:HTML Div And Span Tags

HTML <Div> And <Span> Tags

The SPAN and DIV HTML tags are very useful for use with Cascading Style Sheets.A span is an inline element, and must only contain text content. Div element defines a logical division by placing newlines before or after the division.

HTML Tips

1. Placing <Div> elements inside of other <Div> elements allows these elements to be further subdivided

Difference Between <Div> And <Span> Tags

1. Span element is In-line and Div element is Block element. 2.

Browser Supports

ElementChromeExplorerFirefoxOperaSafari
<Div> and <Span>YesYesYesYesYes

Global Attributes

The <Div> and <Span> tag supports global attributes in HTML.

Event Attributes

The <Div> and <Span> tag supports Event attributes in HTML.


Related Articles




Jesna N Scaria

Articles : 32

I am a Software Developer at Leedhar Technologies
India India