HTML and CSS Reference
In-Depth Information
<ul compact title="Sushi Short List" type="circle">
<li>
Item 1
<ul>
<li>
Item A
</li>
<li>
Item B
</li>
</ul></li>
<li>
Item 2
</li>
</ul>
Compatibility
HTML 2, 3.2, 4, 4.01, 5
XHTML 1.0, 1.1, Basic
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 4+, Safari 1+
Notes
• HTML 2.0 supports only the
compact
attribute.
• The HTML 3.2 specification supports
compact
and
type
.
• Under the strict (X)HTML specifications as well as HTML5, the
ul
element does not
support the
compact
attribute or the
type
attribute. Both of these attributes can be
easily replaced with CSS properties.
• Due to XHTML's deprecation of attribute minimization, the
compact
attribute must
have a quoted attribute when used in the transitional variant:
<ul compact="compact"></ul>
• Many Web page designers and page development tools use the
<ul>
tag to indent
text. The only element that should occur within a
ul
element is
li
, so such markup
does not conform to standards. However, this common practice is likely to continue.
• Since the content model of
ul
says list items should be the only item within
<ul>
tags, nested lists should occur within
<li>
tags rather than outside them as they are
commonly found.
<var> (Variable)
This logical inline element is used to indicate a variable (an identifier that occurs in a
programming language or a mathematical expression), with any enclosed text generally
rendered in italics.
Standard Syntax
<var
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric value"
lang="language code"
style="style information"
title="advisory text">
</var>