Discussion Locked

marquee tag

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I undersatnd that W3C does not validate a page with a marquee tag because of accessibility problems. I also believe that marquee tag is a microsoft invention and is not a standard html tag.

However because it is easy to use, I really like to use it. Now my question is that, is there anyway to apply a 2 or 3 seconds pause between the scrolling images in the marquee tag?

5 replies

by rmrenneboog

Perhaps the simplest way to get a two or three second break between messages in a marquee is to set the time attribute within the marquee tags to specify the lag time between messages.

Or you could add a bunch of spaces to the message being displayed. These can be added at the beginning or the end of the message.
I'm not entirely sure why you would want to do this, though. In my experience with marquee (which is admittedly limited) any messages I've used have scrolled off before the next one begins. We have removed the marquee features from our website recently, because it is indeed an accessibility issue.
There is one other way to add 'white space' to a marquee message using spaces, but it assumes that the message repeats as a continuous stream; that is, that the lag time between messages is zero, so that the first character of the second message appears right next to the last character of the first message. Split the message in two, switch them about, and add the desired number of spaces between the two message pieces. Then use the new 'messed up' text string as your message. When it is being shown in marquee, it should appear as the desired message with a white space delay.

by davoud

Thanks alot for both of you for your messages. I will try your suggestions later on.

What if I want to add a pause on each picture just like a slide show with a pause on each pic.

by bschaettle

Use the setTimeout feature in JavaScript.
Here's an example that will pause 5 seconds between refreshes:

This discussion is closed to new replies.