input {
border: 1px solid black;
padding: 3px;
height: 300px;
}
input:placeholder-shown {
border-color: teal;
color: purple;
font-style: italic;
}
input {
border: 1px solid black;
padding: 3px;
height: 20px;
}
input:placeholder-shown {
border-color: teal;
color: purple;
font-style: italic;
}
::placeholder {
/*styles here*/
}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
/*styles here*/
}
<form>
<input type="text" id="name" name="name" required="required" />
<label for="name">Name</label>
<br/>
<input type="email" id="email" name="email" placeholder="Email" required="required" />
<br/>
<input type="submit" />
</form>
Run code snippetHide results
input placeholder text color change