Css Input Selector

css input selector
input[type="text"] {
background-color: blue;
}
how to write css for input type text
/* For Example, If we want to change css of "text" type
from <input> we do this:*/

input[type=text] {
/* Your Code Here */
}
target css by form name
tag[name="nameofthetag"] {
//style your html tag
}

Example:
<input type="submit" value="Go" name="goButton">
input[name="goButton"] {
background: red;
}
css set styles for input text
input[type="text"] { font-size: 0.9em; padding-top: 0.35rem;}

Leave a Comment