Drop Cap First Letter
CSS
Hard
2 views
Problem Description
Make the first letter of a paragraph large like a drop cap.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use ::first-letter and keep it readable.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
<style>
p { max-width: 60ch; line-height: 1.7; }
p::first-letter { font-size: 48px; font-weight: 700; float: left; line-height: 1; padding-right: 8px; color: #0b5; }
</style>
</head>
<body>
<p>meetcode makes practice simple by giving small questions that you can finish quickly.</p>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!