To create a blinking text effect in HTML, you can use the <blink> tag, which was originally introduced in Netscape Navigator and allowed text to blink on and off. However, the <blink> tag is obsolete and not supported by modern browsers. Instead, you can achieve a blinking effect using CSS with keyframes.

Using CSS to Create Blinking Text:

Here’s an example using CSS:

html

<!DOCTYPE html>
<html>
<head>
<title>Blinking Text Example</title>
<style>
.blink {
animation: blink-animation 1s steps(5, start) infinite;
-webkit-animation: blink-animation 1s steps(5, start) infinite;
}

@keyframes blink-animation {
to {
visibility: hidden;
}
}

@-webkit-keyframes blink-animation {
to {
visibility: hidden;
}
}
</style>
</head>
<body>

<p class="blink">This text will blink!</p>

</body>
</html>

Explanation:

  • .blink: This class is applied to the text you want to blink.
  • animation: Defines the blinking effect using keyframes.
  • @keyframes: Defines the keyframes for the blink animation, making the text invisible at the end of each cycle.

Important Notes:

  • Obsolete <blink> tag: It’s no longer used or recommended due to lack of support in modern browsers.
  • CSS Animation: The method shown above is widely supported and recommended for creating blinking text.

This method is more reliable and works consistently across all modern browsers.

Sign In

Sign Up