A document containing markup information actually describes a
hierarchical "tree" of information, with imaginary branch points
created by markup elements (also known as "tags".) Each continuous
run of text content between the HTML elements is a "leaf" of one of
these element branch points (meaning it has no children or branches
from itself.)
You should already know from past experience that some HTML elements
are not required to have an end tag - in other words, end tags are
required if an element will contain anything inside it (such as text
content or other elements.) If the element has nothing inside it, it
does not need a closing tag.
The rules of HTML and XHTML allow elements to be defined as requiring
[listed as "Required" in this section] or not requiring end tags
[listed as "Optional."] In the case where an element will never
have content, an end tag may be prohibited in the markup language's
definition as well [listed as "Omitted" here.] Hopefully you aren't
TOO thoroughly confused now. ;-}
Standards Details
The HTML 4 DTDs
The HTML 4.0 Recommendation is different than previous standards.
In older versions of HTML, the language was defined in a single
DTD, with only a few
elements being deprecated. The deprecated elements could be "switched
off" if the DTD was invoked in a "Strict" mode.
HTML 4.x has taken a different direction. The W3C is making a strong
move to obsolete most of the presentational elements and attributes
that have proliferated from browser makers since the language began.
These constructs have been moved to
Cascading Style Sheets (CSS) instead.
HTML 4.x DTD Types
To move from current common authoring practice to a new, more restrictive
way of doing things would just be too drastic a move to succeed in
practice. So, the W3C has broken HTML into two distinct modes: "Strict",
and "Transitional" markup. Each of these modes is given its own
DTD, where the Strict mode
confines authors to using the HTML elements that impose structure only
(the original intention of HTML) and rendering rules are specified using
CSS. The Transitional mode, on the other hand, allows authors to use
the markup they have been using all along together with the new
functionality of HTML 4, and still have it all be "legal HTML."
Strict:
This DTD eliminates almost all of the presentational elements,
attributes and other markup from the Transitional DTD, as well as
elements that the W3C expects to phase out in future HTML
standards (actually, XHTML 1.1 actually does drop all of the extra
pieces of the Transitional and Frameset DTDs for good.) The W3C
recommends that the Strict DTD should be used whenever possible, and that
presentational information should be attached with CSS.
"Transitional" or "Loose" DTD:
This is the most "relaxed" of the DTDs - it includes all of the
elements listed in HTML 4.x with no exclusions. All of the legacy
presentational constructs that have been moved over to CSS are
present in this DTD. The W3C recognizes that it may not always be
possible to use the Strict DTD, so the Transitional DTD can fill
the need. Warning: The W3C HAS removed the legacy
presentation elements and attributes from XHTML as of XHTML 1.1.
Frameset DTD:
This DTD is actually just a slight alteration of the Transitional
DTD. It includes all of the Transitional DTD and defines only a
slight modification, allowing the HTML element to legally contain
the FRAMESET element instead of the BODY element. Only documents
using the FRAMESET element should use this DTD.
XHTML Modules
In April 2001, the "Modularization of XHTML" document became a W3C
recommendation. This was an important step in the further development
of XHTML as a living, breathing and adaptable standard; it breaks down
the pieces of XHTML 1.0 in to discrete areas of functionality. This
will allow XHTML to be more easily extended in the future. Perhaps
more importantly it will allow XHTML to be implemented in pieces on
specialized platforms that have not been able to fully implement all
of XHTML in the past because of various constraints and requirements
(consider the case of a browser on a cell phone.) The extensibility of
modularization can also be useful for future rendering needs that can
not yet be imagined.
Core XHTML Modules
These modules are required to be present in any XHTML DTD variant.
Structure, Text,
Hypertext and List modules
Other XHTML Modules
Text Extension (Presentation,
Edit and Bi-directional modules)
Forms (Forms and
Basic Forms modules)
Table (Tables and Basic
Tables modules)
Image
Client-side Image Map
Server-side Image Map
Object
Frames,
Target
Iframe,
Intrinsic Events
Metainformation
Scripting
Style Sheet
Style Attribute
Link
Base
Name Identification
Legacy
CSS 'display' Type
In CSS, an HTML element is usually one of two basic 'display' property
value types - "inline" or "block."
There can, of course, be deviations from these values, but "inline" and
"block" rendering behaviors are the two major categories that are given
the greatest amount of documentation in the CSS standards. These two
display types are the critical components of the CSS box model and are
vital in determining a page's visual rendering.
The 'display' values for this field were taken primarily from CSS2 Appendix A: "A
sample style sheet for HTML 4.0", originally created by Todd
Fahrner. "Display" types for elements not present in that list were
extrapolated based on known behavior and comparisons to elements that
ARE in the list.
CSS Mapping
One of the major goals of HTML 4 was to move away from having
presentation details in HTML itself. These rendering properties were
to be shifted to CSS. This field attempts to describe which CSS
properties and/or behaviors can be used to take the place of HTML-based
rendering details. Mappings listed here come from a number of sources,
including CSS2
Appendix A: "A sample style sheet for HTML 4.0 " originally created
originally by Todd Fahrner, as well as known default renderings in
the popular browsers. Caveat: As mentioned in CSS2, Appendix A:
"The full presentation of some HTML
elements cannot be expressed in CSS..."
Default Rendering
This field attempts to describe the typical initial rendering (visual
or otherwise) of the element/attribute in the major browsers reviewed.
This does not take into account any user style sheets or other
modifications the user may have made to their settings. It also may
not completely describe the rendering behaviors of ALL the
reviewed browsers - it is just an attempt to characterize a so-called
"default effect" that most users will likely experience.
Official Documentation
This entire website attempts to make the standards for HTML more accessible,
but sometimes you just need to go to the source itself. These links are here
to easily link you to the definitive statements on each of these elements if
you desire more information.