EN
CSS - style textarea placeholder text
0
points
In this article, we would like to show you how to style textarea placeholder text using CSS.
Quick solution:
textarea::placeholder {
font-style: italic;
opacity: 0.5;
color: red;
}
Practical example
In this example, we present how to use ::placeholder
pseudo-element to style textarea placeholder text.
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<head>
<style>
textarea::placeholder {
font-style: italic;
opacity: 0.5;
color: red;
}
</style>
</head>
<body>
<textarea placeholder="Placeholder text..."></textarea>
</body>
</html>