DEV Community

Cover image for Text Typing Animation using only HTML & CSS

Posted on • Updated on

Text Typing Animation using only HTML & CSS

Hey friends, today in this blog you'll learn how to create a Simple Text Typing Animation using only HTML & CSS or Typewriter Text Animation. Earlier I have shared a blog on Colorful Gradient Text Effect using HTML & CSS and now I'm going to create pure CSS text typing animation.

You may have seen this type of text animation on many portfolio sites or other sites. Generally, this animation is created using JavaScript or jQuery library, and the famous jQuery library for text animation is typed.js but now I'll tell you how you can create this text typing animation using only HTML & CSS.

In this text animation, there are two types of texts that mean one is a static text which has no animation, and the second one has animation and it changes dynamically. I have added four different texts to this animation and it's shown one by one with a typing animation which looks pretty cool and interesting.

You can copy the codes from the given boxes or download the code files from the given link but I recommend you download the source code files instead of copying codes. Click here to download code files.

You might like this:

Pure CSS Custom Radio Buttons
Colorful Gradient Text Animation
Copy Text to Clipboard JavaScript
CSS Text Glitch Animation Effect

<!DOCTYPE html>
<!-- Created By CodingNepal - -->
<html lang="en">
  <meta charset="UTF-8">
  <title>Multiple Texts Typing Animation | CodingNepal</title>
  <link rel="stylesheet" href="style.css">
  <div class="wrapper">
    <div class="static-txt">I'm a</div>
    <ul class="dynamic-txts">
Enter fullscreen mode Exit fullscreen mode
@import url(';300;400;500;600;700&display=swap');
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #343F4F;
  display: flex;
.wrapper .static-txt{
  color: #fff;
  font-size: 60px;
  font-weight: 400;
.wrapper .dynamic-txts{
  margin-left: 15px;
  height: 90px;
  line-height: 90px;
  overflow: hidden;
.dynamic-txts li{
  list-style: none;
  color: #FC6D6D;
  font-size: 60px;
  font-weight: 500;
  position: relative;
  top: 0;
  animation: slide 12s steps(4) infinite;
@keyframes slide {
    top: -360px;
.dynamic-txts li span{
  position: relative;
  margin: 5px 0;
  line-height: 80px;
.dynamic-txts li span::after{
  content: "";
  position: absolute;
  left: 0;
  height: 100%;
  width: 100%;
  background: #343F4F;
  border-left: 2px solid #FC6D6D;
  animation: typing 3s steps(10) infinite;
@keyframes typing {
  40%, 60%{
    left: calc(100% + 30px);
    left: 0;
Enter fullscreen mode Exit fullscreen mode

Visit CodingNepal for more awesome videos | blogs

Top comments (0)