The blink element is a non-standard HTML element that indicates to a user agent (generally a web browser) that the page author intends the content of the element to blink (that is, alternate between being visible and invisible). The element was introduced in Netscape Navigator but is no longer supported and often ignored by modern Web browsers; some, such as Internet Explorer, never supported the element at all.

Origin

Lou Montulli, often credited as the inventor of the blink element, claims he only suggested the idea, without writing any actual code.

Syntax of the blink element type is identical to such standard HTML inline elements as span. For example: . The rate of blinking is browser-specific, and the tag contains no parameters or means to adjust the rate of blinking. In versions of Mozilla Firefox that support the tag, the text alternates between being visible for three quarters of a second and being invisible for one quarter of a second.

The blink element type was first invented for Netscape Navigator and was supported in its descendants, such as Mozilla Firefox (except for the Netscape 6 and early Mozilla suite browsers—it is thus also absent from SeaMonkey, which descends from Mozilla suite); it was removed from Firefox in version 23.

Some software supports the blink element as an easter egg. Google Search blinks parts of the page when one searches for "blink html". Android's user interface framework supports the blink tag, labeling it as <code>TAG_1995</code> in its source code.

Implementation

The blink value of the CSS text-decoration property allows authors to suggest that text should blink without using proprietary tags, but the CSS 2.1 Specification states that "conforming user agents may simply not blink the text" in order to comply with the User Agent Accessibility Guidelines.

<!--

Example:

-->

<syntaxhighlight lang="html" line="1">

<span style="text-decoration: blink;">Down to the porshrop, down to the streep</span>

</syntaxhighlight>

This produces the following on the page — it is unlikely to actually blink due to modern browsers lacking support for the decoration:

The blink element may also be implemented using CSS animations.

<syntaxhighlight lang="css" line="1">

@keyframes blink {

0% { opacity:1 } 75% { opacity:1 } 76% { opacity:0 } 100% { opacity:0 }

}

blink, .blink-css {

animation:blink 0.75s ease-in infinite alternate;

}

</syntaxhighlight>

When elements are then given the tag <code>blink</code> or class <code>blink-css</code>, such as:

<syntaxhighlight lang="html" line="1">

<span class="blink-css">Down to the porshrop, to the porshrop family treep</span>

</syntaxhighlight>

This produces the following:<!--

The following template imports Template:Blink/styles.css which is just the exact same thing whose source code is given above.

-->

Similar effects can also be achieved through the use of JavaScript.

<syntaxhighlight lang="html" line="1">

<script type="text/javascript">

(function() {

var blinks = document.getElementsByTagName('blink');

var visibility = 'hidden';

window.setInterval(function() {

for (var i = blinks.length - 1; i >= 0; i--) {

blinks[i].style.visibility = visibility;

}

visibility = (visibility === 'visible') ? 'hidden' : 'visible';

}, 250);

})();

</script>

<blink>Text to blink here</blink>

</syntaxhighlight>

Or alternatively, the blink functionality can be implemented with the help of jQuery.

<syntaxhighlight lang="html" line="1">

<script type="text/javascript">

setInterval(function(){

$('blink').each(function() {

$(this).toggle();

});

}, 250);

</script>

<blink>Text to blink here</blink>

</syntaxhighlight>

Usability and accessibility

Even before the implementing of the blink tag in HTML, the Apple IIe had a flashing text mode, alternating between standard white-on-black and inverse black-on-white text. A 1982 Apple Computer manual for developers advised against using this feature except for emergencies, warning that "[f]lashing [text] should only be used to indicate imminent destruction of data or the program".

The blink element has been consistently criticized by usability and accessibility experts. In 1996 Jakob Nielsen described the element as "simply evil" in his Alertbox column "Original Top Ten Mistakes in Web Design".

The World Wide Web Consortium's Web Content Accessibility Guidelines (WCAG) 1.0 state that content authors should avoid causing the screen to flicker or blink, noting that such effects can cause problems for people with cognitive disabilities or photosensitive epilepsy.

The United States Access Board states that pages should "not use flashing or blinking text, objects, or other elements having a flash or blink frequency greater than 2 Hz and lower than 55Hz."

The German Federal Government's Barrierefreie Informationstechnik-Verordnung (Accessible Information Technology Ordinance) also states that flickering or blinking content should be avoided.

To comply with the User Agent Accessibility Guidelines a user agent must either "[a]llow configuration to render animated or blinking text content as motionless, unblinking text" or never blink text. Mozilla Firefox satisfied this requirement by providing a hidden configuration option to disable blinking,