Account
Categories
Shobha
Shobha
The best way to predict the future is to invent it

How do you add drop caps to text using CSS?

To create a drop cap effect in CSS, you use the ::first-letter pseudo-element to target the first letter of a paragraph. By making the first letter larger, bold, and positioning it to the left using the float property, you create the drop cap effect. The rest of the text then wraps around the large letter, giving it a stylish, decorative look at the start of the paragraph. This is commonly used to draw attention to the beginning of a section or paragraph.