String.prototype.blink() is a legacy HTML wrapper that returns a new string wrapping your text in <blink>…</blink>. It takes no parameters and never mutates the original string.
Pass the required arguments shown below. Check return values and browser support before you rely on the result.
Syntax
Call string.blink. Start with this line.
JavaScript
string.blink()
Call
What it does
string.blink()
Primary signature.
string.blink(...)
Call with the arguments your case needs.
Built into JavaScript. Call blink(...) on a string (or String instance) — no import required.
Library declarations
JavaScript
string.blink()
Parameters
This member has no parameters beyond those shown in the signature.
Return Value
Return Value
Description
*
HTML string with <blink> tags
JavaScript Examples
Example 1 — Basic Wrap
Call blink() to build the classic <blink> HTML string.
JavaScript
const text = "Hello, world";
console.log(text.blink());
// "<blink>Hello, world</blink>"
Empty input."".blink() still wraps tags around nothing → "<blink></blink>".
No escaping."A < B" keeps the < character inside the markup.
Type is string. You get text, not a live DOM element.
Safety tip. Never feed untrusted input through blink() into innerHTML.
Example 3 — Prefer Static Emphasis
Compare the legacy wrapper with a modern, accessible approach.
JavaScript
// Legacy — do not use in new code
console.log("Alert".blink());
// "<blink>Alert</blink>"
// Prefer static emphasis (no blinking)
const el = document.createElement("strong");
el.textContent = "Alert";
console.log(el.outerHTML);
// "<strong>Alert</strong>"
Legacy path."Alert".blink() builds obsolete <blink> markup that does not animate today.
Create a real element.createElement("strong") makes semantic emphasis.
Set plain text.textContent is safe and accessible — no flashing.
Rule of thumb. Learn blink() to read old code; never ship blinking text.
Compatibility
Browser & Runtime Support
String.prototype.blink() may still return a string for compatibility, but it is deprecated. The <blink> element itself no longer blinks in modern browsers.
✓ Deprecated · Legacy
String.prototype.blink()
Method may exist for legacy compatibility. The blink visual effect was removed from modern browsers. Do not use in new projects.
LegacyCompatibility only
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
blink()Avoid in new code
Bottom line: Recognize blink() when reading old code. For new UI, use static emphasis — never ship blinking text from string methods or CSS without a strong accessibility review.
Frequently Asked Questions
blink() returns a new HTML string that wraps the text in a <blink> element — for example "Hello".blink() returns "<blink>Hello</blink>". It takes no parameters and does not change the original string.
Yes. MDN marks all HTML wrapper methods as deprecated. The <blink> element was removed from modern browsers. Avoid blinking text for accessibility reasons.
No in modern browsers. The method may still return a <blink> string for compatibility, but the element no longer blinks. Do not rely on it for visual effects.
No. Strings are immutable. blink() returns a new string containing markup; the original text stays the same.
Do not blink text. Prefer static emphasis with color, weight, or size. If motion is truly required, use a careful CSS animation and respect prefers-reduced-motion.
No. Characters like < and > are left as-is inside the wrapper. Never pass untrusted user input through blink() into innerHTML.