I list below all topic groups, which I have done according to subjects, which they handle. You can return to this topic group by using this menu and the link Table of topic groups on the top of the each page.
| |||||||||||||||||||
![]() | Table of topic groups > Front page of help pages > Help pages > 6. Help for HTML ALL menu &Detailed element classifications (section 3/4) |
|---|
Elements have two basic behavior types, inline and block. Normal block elements create a rectangular box and line break before and after them. Depending of elements they can have both block and inline-level child-elements or only inline-level child-elements. Ordinary inline-level elements don't create rectangular boxes around them and they don't create line breaks. They behave like a phase in a line. They can have only inline-level child-elements.
Some elements mix these behaviors. The
behavior type is called as flow. The DTD-files says
about elements DEL and INS, that these
can occur at block or inline level. Depending on situation, they
behave like normal block or inline elements.
HTML 4.01 specification has poor explanations. The
specification doesn't always tell the expected behavior of each
elements. In the DTD-files classifications block, inline and flow
are not enough. In fact some elements should be classified as
inline-block or inline-flow elements (I
have derived the classification inline-block from the
CSS2 specification, which have
display:inline-table; Table itself is a block-level
element, but this property creates to it inline resemble flow;
Into CSS3 is added diplay:inline-block
to get proper presentation especially to some form elements).
These kind of elements are:
OBJECT, MAP and
BUTTON, which according to DTD-files can have
block-level child-elements. The natural behavior of these
elements is inline. They don't behave like DEL and
INS, which behave in some situations like normal
block-level elements. Because these elements can have both
inline-level and block-level elements as their child-elements,
they are inline-flow elements. In principle these elements need
some block-level parent-element (BUTTON has normally
FORM as it parent-element).OPTION and OPTIONGROUP, which
create line breaks like normal block-level elements. Because
these elements require the inline-level parent element
SELECT, which doesn't have any other contents, they
have the behavior inline-block.The DTD-files try to classify all elements into three behavior type. In my mind used element classifications are not fully consistent:
A,,
APPLET, FONT, | BASEFONT,
SCRIPT. The element SCRIPT doesn't
affect to the layout. Elements A and
FONT have the same kind of behavior as normal
inline-level element like B. The element
BASEFONT affects wider than inline-level elements
and its effect range is the same kind of elements
DEL and INS, which have the flow behavior. This classification creates
internal conflicts, because BASEFONT in intended to
set before other elements unlike normal inline elements, which
are intended to use inside some block-level element. According to
advice, the DTD-files should be this kind:-- (BASEFONT?, (%flow;)*
+(INS | DEL)
).NOSCRIPT is classified with the
entity reference %block; even
if it should be rather %flow;.
This matter is fixed in the XHTML 1.0 specification, which is at
this point more consistent than HTML 4.01. It classify this
element under the reference %misc;, which is common to %Inline;, %Block; and %Flow;. I have classified
NOSCRIPT according to the XHTML 1.0 DTD.IMG, APPLET, OBJECT,
MAP and IFRAME are replaced elements.
Some of them can have also block-level contents. Also some form
elements (for example BUTTON), which are listed as
%inline; can have block-level
contents and the behavior resemble replaced inline elements. They
create floating rectangular boxes. In fact they should have an
own classification.Comment. Many authors use
FONT at the same way as BASEFONT even
if according to the specification it should behave like an
ordinary inline-level element. Even if most browsers allow to
that element the flow behavior, I recommend to use it according
to the specification.
It is however possible to create some sub-classifications in the base of them. Concerning the page layout HTML-elements can be classified into sub-classed at the following way:
UL, OL, TABLE and in the
strict document type the element BLOCKQUOTE has
normally a block-level element as its child-element).I, B and SPAN +
A excluding nested anchor elements; from form
elements LABEL and LEGEND have this
kind of behavior).INS,
DEL).CAPTION,
DT, H1-H6, P and in the
strict document type ADDRESS).DD,
DIV, FIELDSET, FORM
(excluding nested forms), LI, TD,
TH and in the transitional document type
BLOCKQUOTE, CENTER and
IFRAME).OBJECT, MAP and
BUTTON and in the transitional document type
APPLET).OPTION
and OPTIONGROUP), but TEXTAREA has a
block parent. These elements behave like the replaced inline
level element IMG.HR and in the transitional document type
ISINDEX).BR and IMG and from form elements
INPUT; even if AREA is not classified
to them it resembles them). Indeed we must ask, if we should
classify them into two sub-classes:
IMG,
INPUT).BR).BASEFONT is this kind of element even if it is
classified in the loose.dtd as an inline-level element (it is
used like an inline-level element, but it affects wider; Indeed
in some browsers it behave like an element container - look at a note).This classification is not without problems, because
inline-level elements can be classified also as replaced (for
example IMG) and non-replaced elements (for example
STRONG). Concerning replaced element, the behavior
resemble floating block level elements (they are created with the
CSS-property float) both empty and non-empty
elements.
If we think about the visual rendering of elements, they have
only three basic alternatives: block,
inline and inline-block. CSS3 will
support all of them with the display property. The
behaviour of some elements, which have the flow behavior or flow
content is different in individual situations. Just this matter
makes classificiations problematic.
| Sections of page: | First section | Previous section | Next section![]() | Last section![]() |