Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
label {
display: block;
color: #777777;
margin: 0 0 4px;
}
input {
border: 1px solid transparent;
padding: 15px;
font-size: 1.2em;
outline: 0;
}
input::placeholder {
color: #8ebf42;
}
label,
input {
font-family: sans-serif;
}
</style>
</head>
<body>
<h2>::placeholder selector example</h2>
<form action="#">
<div>
<label for="name">Name:</label>
<input id="name" name="name" type="text" placeholder="Enter your name here" autofocus>
</div>
</form>
</body>
</html>