|
-
Jun 4th, 2002, 08:05 PM
#1
Thread Starter
Fanatic Member
Span vs. Div
Aren't these two tags the same?
Bird of Prey
Mr. Bald Eagle.
[img][/img]
-
Jun 4th, 2002, 09:22 PM
#2
Fanatic Member
<span> is for spanning inline text and div is a replacement for the <p> tag.
Example:
Code:
This is <span style="color:red">spanning text</span>, see how this works?
Example:
Code:
<div style="border:1px">This is is a paragraph of text.<br>
This works like the <p> except its can interact with javascript by using dhtml.</div>
-
Jun 5th, 2002, 08:00 AM
#3
Frenzied Member
This needs to be in the FAQ.
Span is inline, div is block. I wouldn't say that div is a replacement for p. The p block will wrap around floats. I think that is an inline box attribute.
'Course, you can redefine everything with the CSS.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Jun 5th, 2002, 09:39 AM
#4
Black Cat
I think CSS actually defines all tags as inline until that gets overidden by the UA's default style sheet.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 6th, 2002, 12:12 PM
#5
Thread Starter
Fanatic Member
Bird of Prey
Mr. Bald Eagle.
[img][/img]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|