compact

Jump to: navigation, search



Applies to  ?

Examples

The following example shows how to use the compact property in HTML. Note that the presence of the word COMPACT sets the compact property to true

<HTML>
<BODY>
<DL COMPACT>
<DT>Cat
<DD>A small domesticated mammal.
<DT>Lizard
<DD>A reptile generally found in dry areas.
</DL>
</BODY>
</HTML>

View live exampleThe following example shows how to set the compact property using JScript

<HTML>
<BODY>
<script>
//Function that toggles the compact property for the DL element below
function compactDLToggle()
{
animals.compact = !animals.compact;
toggle.innerText = "Compact = "+animals.compact;
}
</script>
<P style="color:blue; font-weight:bold">Effect of setting COMPACT property for a DL element</P>
<BUTTON id="toggle" onclick="compactDLToggle()">Toggle Compact Property</BUTTON>
<DL id=animals>
<DT>Cat
<DD>A small domesticated mammal.
<DT>Lizard
<DD>A reptile generally found in dry areas.
</DL>
</BODY>
</HTML>

Notes

Remarks

There is no functionality implemented for the compact property for the ul, ol, dir and menu elements unless defined by the author. In Microsoft Internet Explorer 6 and greater, this property applies to the menu and dir objects.

Syntax

Standards information

See also

Related articles

html


















































… further results"html" is not in the list of possible values (Canvas, CSS Font, CSS Layout, Animation, Audio, Background, Border, Box Model, CSS Attributes, CSSOM, Combinators, Deprecated, Document Structure, Exclusions, FileSystemAPI, Filters, Flexbox, Fonts, Generated and Replaced Content, Gradients, Grid Layout, HTML, Multimedia, Media Queries, Mobile, Multi-Column, Off-line Storage, Paged Media, Performance, Pointer Events, Pseudo-Classes, Pseudo-Elements, Regions, Responsive Web Design, Ruby, Scrollbar, Selectors, Security, Shapes, Syntax, Tables, Text, Touch, Transforms, Transitions, Video, Visual Effects, Web Components, WebRTC, XHR) for this property.


Related pages (MSDN)

  • menu
  • dir
  • dl
  • ul
  • ol

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]