View Full Version : HTML/CSS code for flashing text (No javascript)

Apr 22nd, 2007, 06:19 AM
I was wondering if there is a code that works in both IE and Firefox that makes text flash, i would prefer not to use javascript for specific reasons. It's for a profile in a forum site that doesn't allow java. i just want to make a little note for people to read before the send me e-mails

Bill Posters
Apr 22nd, 2007, 07:00 AM
Web accessibility guidelines recommend against the use of flashing/blinking text.

Have you not considered simply using CSS and markup to implement other visual effects and semantic meaning which emphasise the relative importance of the notice?

If you still wish to add a blinking effect…

Apr 22nd, 2007, 07:06 AM
You can use css for 'blinking' text.
text-decoration: blink;

Apr 22nd, 2007, 03:21 PM
blink : Defines a blinking text (does not work in IE and Opera)
From the reference sheet linked to at the w3schools site.

Apr 22nd, 2007, 08:35 PM
Too many epileptics have had to be taken to hospital after viewing web pages with blinking text and the browser creators don't want to be the ones sued for damages so they have disabled the simple way of making text blink so that you will be sued instead if you used a more complex method to put people in hospital by blinking at them.

Bill Posters
Apr 22nd, 2007, 09:01 PM
Fwiw, text-decoration: blink; does in Op9.2/XP[/i], despite the W3Schools note.

Also fwiw, iirc, as a concession to the potential problems associated with blinking content, browsers are free not to support the blink value without compromising their CSS1 compliance.

Apr 23rd, 2007, 04:25 AM
is there any other kind of text effect that doesn't do damage and that will be noticeable and that's usable in both IE and Firefox?

Apr 23rd, 2007, 04:38 AM
cancel that, i'm just going to put it in a table with a noticeable backgound, thanks for the suggestions

Apr 23rd, 2007, 04:42 AM
Table? You can set the background colour of a span or div, too...

Apr 23rd, 2007, 07:12 AM
or even on a paragraph

Bill Posters
Apr 23rd, 2007, 07:17 AM
is there any other kind of text effect that doesn't do damage and that will be noticeable and that's usable in both IE and Firefox?
White, bold text on a red background?
Red, bold text on a white background with coloured, dashed/dotted border?
Text + alert icon img (w/ appropriate alt)?

Avoid underlining any non-linking alert text as underlining is a visual convention more readily associated with links, so may confuse the user.
If you're going to use emboldened text, use the <strong>…</strong> and/or the <em>…</em> elements, rather than simply using CSS.
The notice is meant to be emphasised, so use the right, semantically appropriate markup for the job.