What is CSS Text Shadow Syntax, Examples
CSS Text Shadow Property
This Blog You Will Learn ஃ What is CSS Text Shadow Property
ஃ Why We Use Text Shadow
ஃ Real World Use
ஃ Why Use Text-shadow
ஃ Syntax
ஃ structure diagram examples
ஃ What is CSS Text Shadow Property
ஃ Why We Use Text Shadow
ஃ Real World Use
ஃ Why Use Text-shadow
ஃ Syntax
ஃ structure diagram examples
ஃ Examples
ஃ Output
ஃ Examples
ஃ Output
CSS text-shadow is property used to add a shadow effect to text.
text look stylish ,attractive and sometimes easier to read.
✅ Horizontal Shadow (Required)
- Positive value ➡ right
- Negative value ➡ left
✅ Vertical Shadow (Required)
- Positive value ➡ down
- Negative value ➡ up
✅ Blur Radius (Optional)
- Controls Softness of shadow
- 0 ➡ sharp shadow
✅ Color (optional but Recommended)
- Defines shadow color
Why We Use Text Shadow
✔ Design attractive headings
✔ Create 3D or glowing effects.
✔ Improve text visibility
Real World Use
- Website headings
- Logo design
- Hero section titles
- Buttons
- Banner text
Why Use Text-shadow
- Improve text visibility
- Create 3D effect
- Create glow effect
- Make headings stylish
ஃ structure diagram examples
CSS Text Shadow Property
Examples
CSS Text Shadow Property
Explain Program
<!DOCTYPE html>
- This declare the document type.
- browser that the document is written in html
Step 2]
<html>.... . </html>
- html is the root element of the html page.
- Every thing inside it is part of the webpage.
Step 3]
- <head> section contains metadata and css styles,not visible content.
- Contains styles, metadata and page setting
Step 4]
<style> tag Internal CSS Section
Applies a text shadow all <h1> and <h2> element.
✔ 2px ➡ Horizontal shadow (moves right).
✔ 2px ➡ Vertical shadow (moves down).
✔ 2px ➡ Blue effect.
✔ Pink ➡ Shadow color.
Step 5]
Step 6]
<body> section
- <h1> displays main heading with blue shadow.
- <h2> display website link text with soft pink shadow.
Step 7]
</body> </html>


Post a Comment