Happy New Year 2022 Text Animation With HTML CSS JavaScript

In this tutorial we will see how to make a Happy New Year 2022 Text Animation With HTML CSS JavaScript. Pure CSS and Vanilla JavaScript is used to make this css text animation effect.


Take a look at the HTML code given below.

<p><span>H</span><span>a</span><span>p</span><span>p</span><span>y</span> <span>N</span><span>e</span><span>w</span> <span>Y</span><span>e</span><span>a</span><span>r</span></p>    

CSS Code

CSS code is given below.

    margin: 0;
    padding: 0;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: 'Barlow Condensed' , sans-serif;
    font-size: 120px;
    font-weight: bold;
    text-align: center;
    color: #333;
    cursor: pointer;
    color: yellow;
    text-shadow: 0 0 10px yellow, 0 0 25px yellow;
    animation: glow 1.5s linear infinite;
@keyframes glow
    filter: hue-rotate(0deg);
    filter: hue-rotate(360deg);

JavaScript Code

Take a look at the JavaScript Code given below.

var elem = document.getElementsByTagName('span');
for(var i =0; i < elem.length; i++)
elem[i].addEventListener('click' , function(){



Video Tutorial

Watch our video tutorial on Happy New Year 2022 Text Animation With HTML CSS JavaScript.

Neumorphic Search Bar Design with HTML and CSS Simple Login Form with Placeholder Animation Pure CSS Button with Folded Corner Background Color Change Slider with HTML CSS and JavaScript 404 Page Not Found Template Design with HTML and CSS Movies Blog Card Design with HTML and CSS Simple CSS Border Animation with before and after Selector Custom Social Select Dropdown Menu with CSS and JavaScript Facebook Offline and Online Notification with CSS and JS New Year 2022 Text Animation with CSS and JS Change Placeholder Color using CSS Custom Select Tag DropDown with CSS and JavaScript Profile Card With Hover Effect using HTML and CSS Simple Price Range Slider With HTML CSS and JavaScript Circle With Two Colors using CSS Card With Ribbon using HTML and CSS Simple Loading Screen using HTML and CSS Disable Textarea Resizable Property using CSS Button like Links using CSS Simple Dropdown Menu Using HTML and CSS Background Color Transition using CSS Highlight Required Input Fields using CSS Disable HTML Link using CSS Difference Between Descendant Selector and Child Selector How To Change Color and Size of Hr Tag Using CSS How To Center Align HTML Table Convert Checkbox To Toggle Button Using CSS Drawing Stars using HTML and CSS Button Bounce Effect using CSS Image as Text Background using CSS background-clip Property Vertically Rotate HTML Element using CSS Vertical Align Middle using CSS Text Over Image Hover Effect - Css Hover Simple CSS Button Hover Effect using Before Selector
Password Show Hide with Eye Icon using JavaScript Change Background Color using Dropdown menu with JavaScript Get Select Tag value onchange in JavaScript Check If Class Exists JavaScript Add Event Listener To all Elements of Class JavaScript getElementsByTagName Event Listener JavaScript Change type attribute of Input Element With JavaScript Password Hide and Show with Toggle Emoji Button using JavaScript Hide and Show Navbar On Scroll With JavaScript Empty an Array in JavaScript Get Last Element Of Array Without Removing It Remove Last Element From Array JavaScript Remove First Element From Array in JavaScript Tic Tac Toe Game in JavaScript Remove Class from HTML Tag OnClick JavaScript JavaScript Select li Tag By Index Display JavaScript Variable In HTML Insert HTML Code anywhere With JavaScript JavaScript Date Difference in Days JavaScript Hide Button After Click Simple Click and Hold Effect Using JavaScript Remove Class From All Elements in JavaScript JavaScript Select All HTML Elements Whose ID Start With Same String