Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1010291 of <marquee>

  • Revision slug: Web/HTML/Element/marquee
  • Revision title: <marquee>
  • Revision id: 1010291
  • Created:
  • Creator: slimsag
  • Is current revision? No
  • Comment Tag as obsolete not as non-standard

Revision Content

{{HTMLRef}}
{{obsolete_header}}

Summary

The HTML <marquee> element is used to insert a scrolling area of text.

Attributes

{{htmlattrdef("behavior")}}
Sets how the text is scrolled within the marquee. Possible values are scroll, slide and alternate. If no value is specified, the default value is scroll.
{{htmlattrdef("bgcolor")}}
Sets the background color through color name or hexadecimal value.
{{htmlattrdef("direction")}}
Sets the direction of the scrolling within the marquee. Possible values are left, right, up and down. If no value is specified, the default value is left.
{{htmlattrdef("height")}}
Sets the height in pixels or percentage value.
{{htmlattrdef("hspace")}}
Sets the horizontal margin
{{htmlattrdef("loop")}}
Sets the number of times the marquee will scroll. If no value is specified, the default value is −1, which means the marquee will scroll continuously.
{{htmlattrdef("scrollamount")}}
Sets the amount of scrolling at each interval in pixels. The default value is 6.
{{htmlattrdef("scrolldelay")}}
Sets the interval between each scroll movement in milliseconds. The default value is 85. Note that any value smaller than 60 is ignored and the value 60 is used instead, unless truespeed is specified.
{{htmlattrdef("truespeed")}}
By default, scrolldelay values lower than 60 are ignored. If truespeed is present, those values are not ignored.
{{htmlattrdef("vspace")}}
Sets the vertical margin in pixels or percentage value.
{{htmlattrdef("width")}}
Sets the width in pixels or percentage value.

Event handlers

{{htmlattrdef("onbounce")}}
Fires when the marquee has reached the end of its scroll position. It can only fire when the behavior attribute is set to alternate.
{{htmlattrdef("onfinish")}}
Fires when the marquee has finished the amount of scrolling that is set by the loop attribute. It can only fire when the loop attribute is set to some number that is greater than 0.
{{htmlattrdef("onstart")}}
Fires when the marquee starts scrolling.

Methods

start
Starts scrolling of the marquee.
stop
Stops scrolling of the marquee.

Examples

<marquee>This text will scroll from right to left</marquee>

<marquee direction="up">This text will scroll from bottom to top</marquee>

<marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid">
  <marquee behavior="alternate">
    This text will bounce
  </marquee>
</marquee>

{{EmbedLiveSample("Examples", 600, 450)}}

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', 'obsolete.html#the-marquee-element-2', '<marquee>')}} {{Spec2('HTML WHATWG')}} Make it obsolete in favor of CSS but define its expected behavior, for backward compatibility.
{{SpecName('HTML5 W3C', 'obsolete.html#the-marquee-element-0', '<marquee>')}} {{Spec2('HTML5 W3C')}} Make it obsolete in favor of CSS but define its expected behavior, for backward compatibility.

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 {{CompatGeckoDesktop("1.0")}} 2.0 7.2 1.2
truespeed attribute {{CompatNo}} {{CompatGeckoDesktop("1.9")}} 4.0 {{CompatNo}} {{CompatNo}}
hspace/vspace attribute {{CompatUnknown}} {{CompatGeckoDesktop("1.9")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
loop attribute {{CompatUnknown}} {{CompatGeckoDesktop("1.9")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
truespeed attribute {{CompatUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
hspace/vspace attribute {{CompatUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
loop attribute {{CompatUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

Revision Source

<div>{{HTMLRef}}</div>

<div>{{obsolete_header}}</div>

<h2 id="Summary" name="Summary">Summary</h2>

<p>The HTML <code>&lt;marquee&gt;</code> element is used to insert a scrolling area of text.</p>

<h2 id="Attributes">Attributes</h2>

<dl>
 <dt>{{htmlattrdef("behavior")}}</dt>
 <dd>Sets how the text is scrolled within the marquee. Possible values are <code>scroll</code>, <code>slide</code> and <code>alternate</code>. If no value is specified, the default value is <code>scroll</code>.</dd>
 <dt>{{htmlattrdef("bgcolor")}}</dt>
 <dd>Sets the background color through color name or hexadecimal value.</dd>
 <dt>{{htmlattrdef("direction")}}</dt>
 <dd>Sets the direction of the scrolling within the marquee. Possible values are <code>left</code>, <code>right</code>, <code>up</code> and <code>down</code>. If no value is specified, the default value is <code>left</code>.</dd>
 <dt>{{htmlattrdef("height")}}</dt>
 <dd>Sets the height in pixels or percentage value.</dd>
 <dt>{{htmlattrdef("hspace")}}</dt>
 <dd>Sets the horizontal margin</dd>
 <dt>{{htmlattrdef("loop")}}</dt>
 <dd>Sets the number of times the marquee will scroll. If no value is specified, the default value is −1, which means the marquee will scroll continuously.</dd>
 <dt>{{htmlattrdef("scrollamount")}}</dt>
 <dd>Sets the amount of scrolling at each interval in pixels. The default value is 6.</dd>
 <dt>{{htmlattrdef("scrolldelay")}}</dt>
 <dd>Sets the interval between each scroll movement in milliseconds. The default value is 85. Note that any value smaller than 60 is ignored and the value 60 is used instead, unless<code> truespeed </code>is specified.</dd>
 <dt>{{htmlattrdef("truespeed")}}</dt>
 <dd>By default,<code> scrolldelay </code>values lower than 60 are ignored. If<code> truespeed </code>is present, those values are not ignored.</dd>
 <dt>{{htmlattrdef("vspace")}}</dt>
 <dd>Sets the vertical margin in pixels or percentage value.</dd>
 <dt>{{htmlattrdef("width")}}</dt>
 <dd>Sets the width in pixels or percentage value.</dd>
</dl>

<h2 id="Event_handlers" name="Event_handlers">Event handlers</h2>

<dl>
 <dt>{{htmlattrdef("onbounce")}}</dt>
 <dd>Fires when the marquee has reached the end of its scroll position. It can only fire when the behavior attribute is set to <code>alternate</code>.</dd>
 <dt>{{htmlattrdef("onfinish")}}</dt>
 <dd>Fires when the marquee has finished the amount of scrolling that is set by the loop attribute. It can only fire when the loop attribute is set to some number that is greater than 0.</dd>
 <dt>{{htmlattrdef("onstart")}}</dt>
 <dd>Fires when the marquee starts scrolling.</dd>
</dl>

<h2 id="Methods" name="Methods">Methods</h2>

<dl>
 <dt>start</dt>
 <dd>Starts scrolling of the marquee.</dd>
 <dt>stop</dt>
 <dd>Stops scrolling of the marquee.</dd>
</dl>

<h2 id="Examples">Examples</h2>

<pre class="brush: html">
&lt;marquee&gt;This text will scroll from right to left&lt;/marquee&gt;

&lt;marquee direction="up"&gt;This text will scroll from bottom to top&lt;/marquee&gt;

&lt;marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"&gt;
  &lt;marquee behavior="alternate"&gt;
    This text will bounce
  &lt;/marquee&gt;
&lt;/marquee&gt;</pre>

<p>{{EmbedLiveSample("Examples", 600, 450)}}</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'obsolete.html#the-marquee-element-2', '&lt;marquee&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>Make it obsolete in favor of CSS but define its expected behavior, for backward compatibility.</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'obsolete.html#the-marquee-element-0', '&lt;marquee&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>Make it obsolete in favor of CSS but define its expected behavior, for backward compatibility.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>1.0</td>
   <td>{{CompatGeckoDesktop("1.0")}}</td>
   <td>2.0</td>
   <td>7.2</td>
   <td>1.2</td>
  </tr>
  <tr>
   <td><code>truespeed</code> attribute</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoDesktop("1.9")}}</td>
   <td>4.0</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>hspace/vspace</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop("1.9")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>loop</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop("1.9")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("1.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>truespeed</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("1.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>hspace/vspace</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("1.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>loop</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("1.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>
Revert to this revision