You are currently viewing Text Reveal Animation Using Html Css – Source Code

Text Reveal Animation Using Html Css – Source Code

Telegram Group Join Now

Text Reveal Animation Using Html Css – Source Code

In this article we create a text reveal animation using only html css. We use some span tags in html and then create animation in css. So let’s write html for text reveal animation.

Html Code

<!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 Reveal Animation </title>
        <link rel="stylesheet" href="style.css">

    <h1>Lorem <span class="reveal">Ipsum dolor</h1></h1>
        <p>Mauris imperdiet, ante quis malesuada maximus, velit dolor <span class="reveal">maximus magna, eget lacinia purus neque in purus. Nunc quis vestibulum nulla,</span> in tincidunt elit.


We use a basic html tag in this project. H1, span tags, and paragraph text for html content. You can see the output below using only html.

Html Output

Text Reveal Animation code


Now we write Css Code For Styling and give Text Reveal Effect.

Html Css Project Idea

Css Code 

.reveal {
      linear-gradient(#00DFFC 0 0),
      linear-gradient(#00DFFC 0 0);
    background-size:0 100%;
    background-position:0 0;
    -webkit-box-decoration-break: clone;
            box-decoration-break: clone;
     t 1.2s  .5s both,
     b 1.2s 1.3s both;
  @keyframes t{
    to {background-size:150% 100%}
  @keyframes b{
    to {background-position:-200% 0,0 0}
  body {
    font-family: sans-serif;
    font-weight: 700;
  p {
  h1 {
    margin:10px auto;

That’s a small front-end project. We use basic css animation for this text reveal animation. Using keyframe for particular part animation.

Final Output 

Text Reveal Animation code css

You can see this video for this project output. When the page load text reveals animation start. You can modify this text animation using advanced css or you can use javascript.

Hope you like this project, we create your own and use this project in any project. If you need any more project-related frontend. Visit our homepage and you get 100+ projects💝.

Quiz Project Using Javascript

if you have any confusion Comment below or you can contact us by filling out our contact us form from the home section. 🤞🎉

Code By – @t_afif

written by – Codewithrandom

Telegram Group Join Now

Leave a Reply