How to Create Glowing Text With
HTML & CSS
Video Tutorial of Glowing Text
Glowing Text [Source Codes]
To Create Glowing Text with HTML and CSS, follow the given steps line by line:
Create a folder. You can name this folder whatever you want, and inside this folder, create the mentioned files.
Create an index.html file. The file name must be index and its extension .html
Create a style.css file. The file name must be style and its extension .css
Once you create these files, paste the given codes into the specified files. If you don’t want to do these then scroll down and download the source code by clicking download button.
First, paste the following codes into your index.html file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Glowing Text in Html & CSS only</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<input type="checkbox">
<div>onlinefindout.com</div>
</body>
</html>
Now paste the following codes into your style.css file
body {
padding: 0;
margin: 0;
background: #303030;
display: flex;
margin-top: 200px;
justify-content: center;
align-items: center;
font-family: 'Open Sans', 'Open Sans Regular', sans-serif;
}
input[type="checkbox"] {
position: absolute;
opacity: 0;
cursor: pointer;
height: 90px;
width: 450px;
z-index: 100;
}
div {
position: relative;
height: 90px;
width: 420px;
background: #303030;
color: #606060;
font-size: 50px;
font-weight: 600;
cursor: pointer;
}
input[type="checkbox"]:checked ~ div {
color: yellow;
text-shadow: 0 0 15px yellow, 0 0 25px yellow;
animation: glow 1.5s linear infinite;
}
@keyframes glow {
0% {
filter: hue-rotate(0deg);
}
100% {
filter: hue-rotate(360deg);
}
}
If you face any difficulties while creating your Glowing Text or your code is not working as expected, you can download the source code files by clicking on the download button.