HTML and CSS Reference
In-Depth Information
Element-Specific Attribute
compact This attribute reduces the white space between list items.
Example
<dir>
<li> Header Files </li>
<li> Code Files </li>
<li> Comment Files </li>
</dir>
Compatibility
HTML 2, 3.2, 4, 4.01 (transitional)
XHTML 1.0 (transitional)
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 2.1+, Safari 1+
Notes
• Because the <dir> tag is supposed to be used with short lists, the items in the list
should have a maximum width of 20 characters. This is rarely if ever respected.
• The HTML and XHTML strict specifications do not support this element, and the
HTML5 specification has marked it as obsolete and suggests using a <ul> tag
instead.
• Most browsers will not render a <dir> tag any differently from the <ul> tag.
• HTML 2 and 3.2 define only the compact attribute.
• Most browsers will not render the compact list style.
• For XHTML transitional compatibility, the compact attribute must have a value:
<dir compact="compact"> .
<div> (Division)
This element indicates a generic block of content that should be treated as a logical unit for
scripting or styling purposes.
Standard Syntax
<div
align="center | justify | left | right" (transitional only)
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric identifier"
lang="language code"
style="style information"
title="advisory text">
</div>
Attributes Introduced by HTML5
accesskey="spaced list of accelerator key(s)"
contenteditable="true | false | inherit"
contextmenu="id of menu"
Search WWH ::




Custom Search