Text Typing Animation Pure CSS

Syiainfoku make a Text Typing Animation Pure CSS
Text Typing Animation Pure CSS

Hello !

Welcome back, with me the founder of Syiainfoku. You will learn together on the Syiainfoku blog how to make a Text Typing Animation no JavaScript pure HTML and CSS.

Ok, let's get started

Preview Text Typing Animation

Preview Text Typing Animation

More or less the result will be like in the image above.

Source Code and Brief Explanation

To make this program [Text Typing Animation]. First you need to create two Files, one HTML File and one CSS File. After creating these files, just paste the following code into your file. You can also download the source code file of this Text Typing Animation from the given download button.

First, create an HTML file with the name index.html and paste the given code in your HTML file. Remember, you must create a file with an .html extension.

<!DOCTYPE html>
<html lang="en">

<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text Typing Animation | hitoricoding</title>
<link rel="stylesheet" href="./assets/style.css">

<h1 data-text="MX Linux">MX Linux</h1>


Finally, create a CSS file with the name style.css and paste the given code in your CSS file. Remember, you must create a file with a .css extension.

@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Roboto', sans-serif;

body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: radial-gradient(ellipse at bottom, #182735 0%, #090a0e 100%);

h1 {
position: relative;
color: transparent;
font-size: 112px;
white-space: nowrap;

h1::before {
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
width: 0%;
height: 100%;
color: #b5cadd;
text-shadow: 0px 1px 5px #4092fc;
border-right: 8px solid #4092fc;
overflow: hidden;
animation: typing 5s linear infinite,
blink 0.75s step-end infinite;

@keyframes typing {

100% {
width: 0;

90% {
width: 100%;

@keyframes blink {

to {
border-color: transparent;

50% {
border-color: #4092fc;

That's it, now you have successfully created a Text Typing Animation, If your code is not working or you are facing any error/problem, please download the source code file from the given download button. It's free and a .zip file will be downloaded then you have to extract it.


Thank you for those of you who have read and downloaded this source code, hopefully it can be useful and add to your insight.

If you found this article useful, you can share it. That's all from me, and THANK YOU