Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 11-08-2007, 12:25 PM Span vs. Div vs. P
Silent77's Avatar
Ultra Talker

Posts: 269
Name: Silent
Location: Ohio
Trades: 0
I was wondering if someone could give me a link to a website that explains the differance and when and where to use these tags: <div> <span> and <p>.

Thanks.
__________________
Firefox
rediscover the web

Please login or register to view this content. Registration is FREE
Down with internet explorer!
Silent77 is offline
Reply With Quote
View Public Profile Visit Silent77's homepage!
 
 
Register now for full access!
Old 11-08-2007, 01:47 PM Re: Span vs. Div vs. P
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
http://w3schools.com/tags/default.asp
will tell you what they are and how to use them.
joder is offline
Reply With Quote
View Public Profile
 
Old 11-08-2007, 01:50 PM Re: Span vs. Div vs. P
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-13-2007, 09:47 AM Re: Span vs. Div vs. P
Junior Talker

Posts: 1
Name: Andrés Boc ho
Trades: 0
Quote:
Originally Posted by chrishirst View Post
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!
dubrubru is offline
Reply With Quote
View Public Profile
 
Old 11-14-2007, 04:57 AM Re: Span vs. Div vs. P
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
So, yes, we can use DIV and SPAN for presentational meaning.
They can, provided they are styled as such, however they have no inherent meaning to non visual user agents.
But then of course the example given promptly uses a table, which has inherent structural meaning, for setting the data out.

Using a definition list would be a better way of structuring contact details
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Span vs. Div vs. P
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.32440 seconds with 12 queries