DIV VS SPAN

| | Comments (0) | TrackBacks (0)

How do you know when to use the DIV element and when do you use SPAN?
In a nutshell, DIV is a block level element. In other words, you use it to define the characteristics you want a whole block of code to follow. It is used to break up sections of a page and it can contain additional tags. If you are familiar with HTML, the DIV element is very similar to the P (paragraph) element.
On the other hand, SPAN is an inline element. Inserting a SPAN tag into a line of code lets the browser know to apply the indicated style to a small section of text, but not to break the line. It cannot contain any additional elements. It is kind of like the old FONT element that you would apply in HTML.

0 TrackBacks

Listed below are links to blogs that reference this entry: DIV VS SPAN.

TrackBack URL for this entry: http://learningremix.emich.edu/cgi-bin/mtos/mt-tb.cgi/5678

Leave a comment

About this Entry

This page contains a single entry by Diwakar Vemuri published on May 14, 2008 1:47 AM.

PHP and its Features was the previous entry in this blog.

Microsoft earnings hit the mark is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.1rc1