In our last episode,
<YYQXd.6099$cN6.5041@newsread1.news.pas.earthlink. net>,
the lovely and talented Hello
broadcast on comp.infosystems.
www.authoring.stylesheets:
[color=blue]
> Hello, I am a self-taught home developer:[/color]
Unfortunately, in this case it shows.
The fist step is to learn to write valid HTML. I don't think
you have done that, but your questions indicate that you do not
know what valid HTML is. If you do not begin with a valid
document, you only dig yourself in deeper and deeper by trying
to style your document.
[color=blue]
> Question:[/color]
[color=blue]
> As it seems, most CSS people like to use DIVs as a division between styles.
> So, they would have a style for a div tag that would hold some other styles
> and other tags...[/color]
[color=blue]
> One thing I fail to understand about people being so addicted to DIV is that
> it this tag is similar to <P> tag; it creates a new paragraph whenever you
> use DIV. What is a difference then between P and DIV?[/color]
DIV is an arbitrary *block* element. It can contain other block
elements (including other DIVs). P is block element for
paragraphs. P cannot contain other block elements; it cannot
contain other Ps; it cannot contain DIVs. DIV does not create a
new P. But DIV will close any P that is open.
[color=blue]
> I tend to use SPAN because it does not generate any line break.[/color]
SPAN is an *inline* element. It cannot contain a block element.
SPAN is closed whenever the block containing it is closed.
[color=blue]
> Am I missing something?[/color]
Yes, you seem to be missing even the most basic grasp of what
HTML is all about. There are many free tutorials on HTML
available on the web. Google for them, and work through a few.
[color=blue]
> Why people like DIV so much? Please
> explain because I do struggle for understanding of this topic.[/color]
--
Lars Eighner
eighner@io.com http://www.io.com/~eighner/
War on Terrorism: History a Mystery
"He's busy making history, but doesn't look back at his own, or the
world's.... Bush would rather look forward than backward." --_Newsweek_