Placeholder Style
CSS
Medium
2 views
Problem Description
Style an input placeholder for a search box.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use ::placeholder 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>
input { padding: 10px 12px; border: 1px solid #ccc; border-radius: 12px; width: 320px; }
input::placeholder { color: #6b7280; }
</style>
</head>
<body>
<input type='search' placeholder='Search meetcode questions'>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!