Name

COMPACT — NN 3 IE 3 HTML 3.2

Synopsis

COMPACT

Optional

When set to true (by virtue of its presence in the DL element tag), the COMPACT Boolean attribute instructs the browser to render a related DT and DD pair on the same line if space allows. The criterion for determining this space (as worked out in both Navigator and Internet Explorer) is related to the amount of indentation normally assigned to a DD element (indentation size differs slightly with operating system). With COMPACT turned on, if the DT element is narrower than the indentation space, the DD element is raised from the line below and displayed on the same line as its DT element. Because the width of characters in proportional fonts varies so widely, there is no hard-and-fast rule about the number of characters of a DT element that lets the DD element come on the same line. But this compact styling is intended for DT elements consisting of only a few characters.

Example

<DL COMPACT>ListItems</DL>

Value

Case-insensitive attribute name. Its presence sets the feature to true.

Default

false

Object Model Reference

IE

[window.]document.all.elementID.compact

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.