How to create a blink text using JavaScript?


To create a blinking text, use the JavaScript blink() method. This method causes a string to blink as if it were in a BLINK tag.

Note − HTML <blink> tag deprecated and is not expected to work in every browser.

Example

You can try to run the following code to create a blinking text with the JavaScript blink() method −

Live Demo

<html>
   <head>
      <title>JavaScript String blink() Method</title>
   </head>

   <body>
      <script>
         var str = new String("Demo Text");
         document.write(str.blink());
         document.write("<br><br> Note: HTML <blink> tag deprecated and is not expected to work in every browser.")
      </script>
   </body>
</html>

Updated on: 15-Jun-2020

4K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements