1. Home
  2. Computing & Technology
  3. JavaScript

Cross Browser Ticker/Marquee

Introduction

Internet Explorer introduced a proprietary tag <marquee> to allow horizontally scrolling text to be added to a web page. While some other browsers have also added support for this tag it is still not recognised by all modern browsers and also the things that you can do with the tag are very limited.

By replacing the proprietary tag with an ordinary <div> and a few lines of Javascript we can produce some horizontally scrolling text that is at least as flexible in how it can be configured as the proprietary tag is and which will also work on any recent Javascript enabled browser (IE5+, Netscape 6+, Opera 7+, Firefox, etc.). It also has the added advantage that you can validate your HTML and not get an error because of your having used a proprietary tag.

Let's begin by taking a look at an example so that we can see how this works.

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.