Skip to content
Related Articles

Related Articles

Improve Article

HTML | <blink> Tag

  • Last Updated : 03 Jun, 2020
Geek Week

The HTML <blink> tag is used to create a blinking text that flashes slowly. It has been obsolete all told fashionable browsers whereas some browsers never supported it in the least. This tag was also never standardized by hypertext mark-up language.

You may recreate an identical visual impact using CSS and JavaScript. Internet usage guidelines powerfully advise to not use blinking text, because it might cause issues to disabled users. Blinking impact is employed rarely seldom because it is annoying for the users to look at of text perpetually blinking on and off.

Example 1: This example won’t work as a result of blink component is deprecated. To induce the blinking impact to sit down with EXAMPLE 2 that is enforced with JavaScript.




<!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:

Exampleb 2: This example using JavaScript to create a blinking effect.




<!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:

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :