Geeks With Blogs

Anirudha gupta

There is many difference between Div and html.


Div is block element and span is inline. If you give padding to div it will work but not to span without set display :block or :inline-block

You can use span inside div but not div inside span. If you tried it you can see code is invalid.

Read this discussion on SO

Posted on Wednesday, July 24, 2013 10:34 AM | Back to top

Comments on this post: Div vs span in html !

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Anirudha | Powered by: