Topic: Stupid? Basic? Ah, just what I need... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=9566" title="Pages that link to Topic: Stupid? Basic? Ah, just what I need... (Page 1 of 1)" rel="nofollow" >Topic: Stupid? Basic? Ah, just what I need... <span class="small">(Page 1 of 1)</span>\

 
Lord_Fukutoku
Paranoid (IV) Inmate

From: West Texas
Insane since: Jul 2002

posted posted 12-05-2002 20:21

I just finished scanning through the FAQ, and did a quick search of the archives, and all that good stuff...
Still no luck... Or I'm going blind, :shrugs:

What are the differences between <p>, <div>, and <span>?
I know I've read a thread, or an article, or something awhile back on it, but I haven't found it yet.

Or if someone could point in the right direction I'd appreciate it. I'm working my way through the W3schools pages now, so if I find what I'm looking for I'll drop a line in here that this thread can be closed.


TIA,
PKSII


-- Unoriginal Cell 693 --

Lord_Fukutoku
Paranoid (IV) Inmate

From: West Texas
Insane since: Jul 2002

posted posted 12-05-2002 20:42

All righty, think I've got it now. All I had to do was post here, then sure enough, I'd find what I was looking for real quick.

<p> = paragraph, duh, I knew that... must be more tired than I thought. Inserts 2 line breaks after contents.
<div> = defines a "block" section of a page, most browsers insert a line break before and after the contents.
<span> = defines an "inline" section af a page, NO line breaks.

So, I think that about answers it...
If anyone has anything to add, I'm all ears. Otherwise, one of you mods can just close this.


-- Unoriginal Cell 693 --

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 12-05-2002 20:44

That's about the long and short of it.

=)



Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 12-08-2002 21:46

One more thing -- if you're using CSS, there are some attributes that can only be applied to block-level elements, and some that can only be applied to inline elements. Interestingly, you can mix and match these to an extent, by setting "display: block" on an inline element or vice versa.

Lord_Fukutoku
Paranoid (IV) Inmate

From: West Texas
Insane since: Jul 2002

posted posted 12-09-2002 17:10

Ah, thanks PT, that answered my other question in the css forum


-- Unoriginal Cell 693 --

Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 12-24-2002 18:59

Another difference would be that the <span> tag can't use the "align=" attribute, yet the <div> and the <p> can both use the align attributes....

<span align='right'>text here</span> won't work
<div align='right'>text here</div> will work
<p align='right'>text here</p> will work

also with the <div> tags, unlike the <P> tag, the ending tag of the <div> is not optional.


[This message has been edited by Synthetic (edited 12-24-2002).]

[This message has been edited by Synthetic (edited 12-24-2002).]

Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 12-24-2002 20:49

Of course, it's best to close all your <p> tags no matter what, just to make sure.

edit: Same with <li>s.

[This message has been edited by Perfect Thunder (edited 12-24-2002).]

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 12-25-2002 00:33

If you really want to get this down you should go and read the DTD, for the version of (X)HTML that you are using.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu