To create a glowing text-shadow, we will use HTML to create the structure and CSS for the styling of the text. With the help of CSS, we can add shadow to text.
HTML Code: In this section, we will design the basic structure of the code.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Glowing Text</title> <link rel="stylesheet" href="style.css"> </head> <body> <h1>Hello !</h1> <h1>GeeksforGeeks</h1> </body> </html> |
CSS Code: In this section, we will use some CSS property to design the Glowing text shadow. The CSS text-shadow property applies shadow to text.
The text-shadow CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its decorations. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color.
body{ background: black; } h1{ margin-top: 150px; text-align: center; font-size: 60px; font-family: 'century gothic'; color: #ffffcc; text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px green, 0 0 30px green, 0 0 40px green, 0 0 55px green, 0 0 70px green; } |
Complete Code: It is the combination of above two code section.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Glowing Text</title> <style> body{ background: black; } h1{ margin-top: 150px; text-align: center; font-size: 60px; font-family: 'century gothic'; color: #ffffcc; text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px green, 0 0 30px green, 0 0 40px green, 0 0 55px green, 0 0 70px green; } </style> </head> <body> <h1>Hello !</h1> <h1>GeeksforGeeks</h1> </body> </html> |
Output:

Recommended Posts:
- How to create long shadow of text without using text-shadow in HTML and CSS ?
- How to create Glowing Star effect using HTML and CSS?
- How to Design Stitched Glowing Effect for Button using HTML and CSS ?
- Glowing Cube loader using HTML & CSS
- How to add shadow to text using CSS ?
- CSS | text-shadow Property
- How to style icon color, size, and shadow by using CSS ?
- Fabric.js | Text shadow Property
- How to add a box-shadow on one side of an element using CSS?
- Drop shadow for PNG image using CSS
- Text Animation with changing the color of the text using HTML & CSS
- How to Create a Cutout Text using HTML and CSS ?
- How to Create Liquid Filing Effect on Text using HTML and CSS ?
- How to Create Loading Blur Text Animation Effect using HTML and CSS ?
- Create a 3D Text Effect using HTML and CSS
- How to create text-reveal effect using HTML and CSS ?
- How to Create Engraved Text Effect using HTML and CSS ?
- How to create linear gradient text using HTML and CSS ?
- How to Create Text Color Animation using HTML and CSS ?
- How to Create Text Reveal Effect for Buttons using HTML and CSS ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


