Glowing Neon Light Text Effects with HTML & CSS

Web Design & Web Development

Demo

Sponsored links

 

Video

YouTube Channel

 

Code

HTML

<!DOCTYPE html>
<html>
  <head>
    <title>Neon Light Text</title>
    <link rel="stylesheet" type="text/css" href="style.css">
  </head>
  <body>
    <div id="container">
      <h1 class="NeonLightText">Neon Light Text</h1>
    </div>
  </body>
</html>

CSS

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap');
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background: #000;
}
#container {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.NeonLightText {
  position: relative;
  font-size: 6em;
  color: #fff;
  letter-spacing: 4px;
  text-shadow: 0 0 20px #f000ff;
}
.NeonLightText::after {
  content: 'Neon Light Text';
  position: absolute;
  top: 0;
  left: 0;
  color: #f000ff;
  filter: blur(15px);
  z-index: -1;
}
.NeonLightText::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f000ff;
  opacity: .5;
  filter: blur(40px);
  z-index: -2;
}