Open In App

HTML <blink> Tag

Improve
Improve
Like Article
Like
Save
Share
Report

The HTML <blink> tag is used to create a blinking text that flashes slowly. It has become obsolete in all modern browsers, as some browsers never supported it at all. Additionally, this tag was never standardized by HTML.

Using CSS and JavaScript, it’s possible to achieve the same visual effect without the need for blinking text. Internet usage guidelines strongly advise against the use of blinking text, as it can cause difficulties for disabled users. Blinking text is rarely used because it can be annoying for users to continuously see text blinking on and off.

Example 1: This example won’t work as a result of the blink component being deprecated.

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
        Blinking text using HTML
    </title>
</head>
 
<body>
    <h1>GeeksforGeeks</h1>
    <blink>
        Blink tag not working
        in HTML
    </blink>
</body>
 
</html>


Output:

Example 2: In this example we will see using JavaScript to create a blinking effect.

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
        Blinking with JavaScript
    </title>
    <style>
        #blink {
            font-size: 20px;
            font-weight: bold;
            font-family: sans-serif;
        }
    </style>
</head>
 
<body>
    <p id="blink">
        Hello Geeks let's Blink
    </p>    
    <script type="text/javascript">
        var blink =
            document.getElementById('blink');
 
        setInterval(function () {
            blink.style.opacity =
            (blink.style.opacity == 0 ? 1 : 0);
        }, 1000);
    </script>
</body>
 
</html>


Output:



Last Updated : 05 Jan, 2024
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads