w3schools    w3Schools
Search W3Schools :
   
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
ADVERTISEMENTS

XML Certification
Download XML editor
Custom Programming
 
Table of contents
HTML Reference
HTML by Alphabet
HTML by Function
HTML Attributes
HTML Events
HTML Colornames
HTML Character Sets
HTML ASCII
HTML ISO-8859-1
HTML Symbols
HTML URL Encode
HTML Lang Codes
HTTP Messages

HTML Tags
<!-->
<!DOCTYPE>
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<b>
<base>
<basefont>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<dd>
<del>
<dfn>
<dir>
<div>
<dl>
<dt>
<em>
<fieldset>
<font>
<form>
<frame>
<frameset>
<head>
<h1> - <h6>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<kbd>
<label>
<legend>
<li>
<link>
<map>
<menu>
<meta>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<p>
<param>
<pre>
<q>
<s>
<samp>
<script>
<select>
<small>
<span>
<strike>
<strong>
<style>
<sub>
<sup>
<table>
<tbody>
<td>
<textarea>
<tfoot>
<th>
<thead>
<title>
<tr>
<tt>
<u>
<ul>
<var>

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Tutorials
W3Schools Forum

Helping W3Schools

 

HTML dir compact Attribute


HTML dir Tag Reference HTML <dir> tag

Definition and Usage

The compact attribute specifies that the spacing between lines and indentation of the list should be reduced.


Compatibility Notes

The compact attribute of the del element was deprecated in HTML 4.01 and is not supported in XHTML 1.0 Strict DTD.

Use CSS instead.

There is no CSS property that does the exact same thing that the compact attribute was supposed to do. However, the line-height property could be a suitable replacement.

CSS syntax: <dir style="line-height: 100%">

In our CSS tutorial you can find more details about the line-height property.


Syntax

<dir compact="compact">

Attribute Values

Value Description
compact Specifies a compact list.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The attribute is deprecated, not supported by major browsers, and should be avoided.


Example

Source Output
<dir compact="compact">
<li>Peter Griffin</li>
<li>Glenn Quagmire</li>
<li>Cleveland Brown</li>
</dir>
  • Peter Griffin
  • Glenn Quagmire
  • Cleveland Brown


  • Try-It-Yourself Demos

    dir compact attribute example
    Make the directory list more compact using the dir compact attribute.

    In CSS: dir list line-height example
    Make the directory list more compact using CSS.


    HTML dir Tag Reference HTML <dir> tag

    Make your web applications look like a million bucks

    FusionCharts   

    Most web applications today use boring methods to present data to their viewers using grids or simple HTML tables. FusionCharts induces "life" into the web applications by converting monotonous data into lively charts, gauges & maps.

    FusionCharts works with all technologies like ASP, ASP.NET, PHP, ColdFusion, Ruby on Rails, JSP, HTML pages etc. and connects to any database to render animated & interactive charts. It takes less than 15 minutes and no expertise whatsoever to build your first chart and just a glance of it to captivate your audience. This fact is endorsed by our 12,000 customers and 150,000 users which include a majority of the Fortune 500 companies. And yeah, your applications could look like a million bucks by spending just $69.

    So go ahead, download your copy of FusionCharts and start "wow-ing" your customers now!


     
    WEB HOSTING
    Shopping Cart
    ASP.NET
    Shopping Cart
    $15 Domain Name
    Registration
    Save $20 / year!
    Buy UK Domain Names
    Register Domain Names
    Cheap Domain Names
    Cheap Web Hosting
    Best Web Hosting
    PHP MySQL Hosting
    Top 10 Web Hosting
    UK Reseller Hosting
    Web Hosting
    FREE Web Hosting
    WEB BUILDING
    Website Templates
    Flash Templates
    Website Builder
    Internet Business Opportunity
    Custom Programming
    FREE Trial or Demo
    Web Content Manager
    Forms,Web Alerts,RSS
    Download XML editor
    FREE Flash Website
    FREE Web Templates
    EDUCATION
    US Web Design Schools
    HTML Certification
    JavaScript Certification
    XML Certification
    PHP Certification
    ASP Certification
    Home HOME or Top of Page Validate   Validate   W3C-WAI level A conformance icon Printer Friendly  Printer Friendly

    W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user.
    While using this site, you agree to have read and accepted our terms of use and privacy policy.
    Copyright 1999-2009 by Refsnes Data. All Rights Reserved.