-
Hajipur, Bihar, 844101
Hajipur, Bihar, 844101
CSS Basics
CSS Styling Properties
CSS Box Model
CSS Margin
CSS Padding
CSS Borders
CSS Outline
CSS Height/Width
CSS Max-width
CSS Display
CSS Position
CSS Z-index
CSS Overflow
CSS Float
CSS Inline-block
CSS Align
CSS Box Sizing
CSS Text
CSS Fonts
CSS Icons
CSS Text Effects
CSS Web Fonts
CSS Colors
CSS Backgrounds
CSS Color Keywords
CSS Gradients
CSS Shadows
CSS Links
CSS Lists
CSS Tables
CSS Advanced Selectors & Features
CSS Combinators
CSS Pseudo-classes
CSS Pseudo-elements
CSS Attribute Selectors
CSS Specificity
CSS !important
CSS Units
CSS Variables
CSS @property
CSS Math Functions
CSS Media and Image Styling
CSS Image Styling
CSS Image Centering
CSS Image Filters
CSS Image Shapes
CSS object-fit
CSS object-position
CSS Masking
CSS Layout Techniques
CSS Website Layout
CSS Navigation Bar
CSS Dropdowns
CSS Image Gallery
CSS Counters
CSS Pagination
CSS Multiple Columns
CSS User Interface
CSS Flexbox
CSS Grid
CSS Responsive Design (RWD)
CSS Text Effects are techniques that enhance the appearance of text visually using properties like:
text-shadow
text-overflow
word-wrap
writing-mode
direction
white-space
And others
These effects help make text more visually appealing, readable, or stylized.
text-shadow
Adds shadow to text.
h1 {
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
Format:text-shadow: horizontal-offset vertical-offset blur-radius color;
text-overflow
Specifies how overflowed text is handled.
p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
🟢 Adds ...
when text is too long to fit.
white-space
Controls how white space and line breaks are handled.
p {
white-space: nowrap; /* or pre, pre-wrap, normal */
}
word-wrap
or overflow-wrap
Breaks long words into the next line.
p {
word-wrap: break-word; /* or overflow-wrap: break-word; */
}
writing-mode
Changes the direction of the text flow.
p {
writing-mode: vertical-rl;
}
🟢 Supports vertical or horizontal text orientation.
h1 {
background: linear-gradient(to right, red, blue);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
🟢 Creates colorful gradient-filled text.
h2 {
text-shadow: 0 0 5px red;
animation: glow 1s infinite alternate;
}
@keyframes glow {
from { text-shadow: 0 0 5px red; }
to { text-shadow: 0 0 20px yellow; }
}
Q1. Add a shadow to an <h1>
text.
Q2. Use ellipsis when text overflows a paragraph.
Q3. Prevent line breaks in a single-line text block.
Q4. Apply word-wrap
to break long words.
Q5. Display text vertically from top to bottom.
Q6. Create gradient-colored text using background-clip
.
Q7. Animate text shadow with two colors.
Q8. Add multiple layered shadows for depth.
Q9. Limit text to a single line and show ellipsis.
Q10. Create glowing text using @keyframes
.
CSS Basics
CSS Styling Properties
CSS Box Model
CSS Margin
CSS Padding
CSS Borders
CSS Outline
CSS Height/Width
CSS Max-width
CSS Display
CSS Position
CSS Z-index
CSS Overflow
CSS Float
CSS Inline-block
CSS Align
CSS Box Sizing
CSS Text
CSS Fonts
CSS Icons
CSS Text Effects
CSS Web Fonts
CSS Colors
CSS Backgrounds
CSS Color Keywords
CSS Gradients
CSS Shadows
CSS Links
CSS Lists
CSS Tables
CSS Advanced Selectors & Features
CSS Combinators
CSS Pseudo-classes
CSS Pseudo-elements
CSS Attribute Selectors
CSS Specificity
CSS !important
CSS Units
CSS Variables
CSS @property
CSS Math Functions
CSS Media and Image Styling
CSS Image Styling
CSS Image Centering
CSS Image Filters
CSS Image Shapes
CSS object-fit
CSS object-position
CSS Masking
CSS Layout Techniques
CSS Website Layout
CSS Navigation Bar
CSS Dropdowns
CSS Image Gallery
CSS Counters
CSS Pagination
CSS Multiple Columns
CSS User Interface
CSS Flexbox
CSS Grid
CSS Responsive Design (RWD)