DIV vs SPAN??

Dis vs Span??

DIV is a block level element.
It can contain many tags and is used to break up sections of the page.If you are familiar with HTML,the DIV element is very similar to the P (paragraph) element.

div

This Paragraph is aligned to the left.

SPAN is an inline element.
It can not contain any additional elements.Inserting a SPAN tag does not break the line and indicates style to a small section of text.

span

This Paragraph is aligned to the left and the second last word is in RED color.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s