Quote:
Originally Posted by chrishirst
The basic differences are;
A div is a block level formatting element, and gives a generic structure to a document but has no presentational meaning.
A span is an inline formatting element with no presentational meaning
A p is a paragraph element, a block element and a structural element that has a presentational meaning.
Block elements have an implied line feed above and below. Inline elements do not.
http://www.w3.org/TR/html401/struct/global.html
|
Actually, the link above to w3.org, in the part " 7.5.4 Grouping elements: the DIV and SPAN elements" says:
Since HTML does not include elements that identify objects such as "client", "telephone number", "email address", etc., we use DIV and SPAN to achieve the desired structural and presentational effects.
So, yes, we can use DIV and SPAN for presentational meaning.
Greetings!
|