Re: inline vs. block



David Dorward <dorward@xxxxxxxxx> wrote in
news:e0erfq$t2g$1$8302bc10@xxxxxxxxxxxxxxxx:

Stan McCann wrote:

How is a novice to tell the difference between an inline and block
level element?

The basic difference is that blocks have a line break before and
after them, while inline flow beside each other and word wrap.

I knew that. I was looking for something to explain to those brand new
to HTML how to tell the difference to prevent things like <code><pre>
as my students are not understanding the validator's complaints.

For many elements, it is marked as in:
<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form
-->

For others, it seems that this is incorrect:
<!ELEMENT ADDRESS - - (%inline;)* -- information on author -->

Is this saying that address (p and possibly others) are inline
elements or am I reading it wrong?

You are. That says that the ADDRESS element may contain "zero or
more elements in the group %inline" (and nothing else).

Ah. Thanks for that; the light comes on.

(The form bit says it may contain one or more elements which are
either script or in the group %block except other FORM elements).

Is there someplace else in the specification
that states whether an element is inline or block?

http://www.w3.org/TR/html4/sgml/dtd.html#block


I had looked at that many times. Only after your pointing it out did I
actually perceive what it is saying. A great example of "The more I
learn, the more I realize there is so much more to learn." Thanks
much.

--
Stan McCann, "Uncle Pirate" http://stanmccann.us/
Webmaster, NMSU at Alamogordo http://alamo.nmsu.edu/
Now blocking Google Grouper posts and replies.
http://blinkynet.net/comp/uip5.html
.



Relevant Pages

  • Re: Delphi 6 vs C# speed comparison
    ... > blanket statement that .NET was slow was always true. ... at the low execution times you're ... benefits of inline. ... just saying if you weren't aware of it's value, ...
    (borland.public.delphi.non-technical)
  • Re: What is the gain of "inline"
    ... "inline" can't really suggest anything else but to inline the called ... redundant keyword nowadays as most compilers will automatically inline ... I'm saying that in most modern compilers you will get function ... It's like saying "auto" on stack variables... ...
    (comp.lang.c)
  • Re: DTD? Is address element block or inline?
    ... > I'm trying to learn how to read a DTD I wanted to use, ... > to ensure I was treating each element correctly in terms of being block, ... > inline, or flow. ... it's saying that the content of the address element must be ...
    (comp.infosystems.www.authoring.html)
  • Re: [patch] x86: phase out forced inlining
    ... be used throughout the kernel: ... inline: 25648 ... I'll assume this is the preferred way of saying it. ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Problem with references and bibliography.
    ... I have used the references before and saved sources and used the inline ... citations. ... I went to write another report and Word keep saying that I have ...
    (microsoft.public.word.docmanagement)