border: ***;
Browser |
|
---|
The border property sets the border of an element.
The border of the form fields can be specified by applying this property to the INPUT, SELECT, and TEXTAREA elements.
input, select, textarea {
border: 2px red solid;
}
Property | Value | Explanation |
---|---|---|
border | each value | sets width, color, and style |
Example
<html>
<head>
<title>TAG index</title>
<style type="text/css">
#example1 {
width: 250px;
border: medium #85b9e9 dotted;
}
#example2 {
width: 200px;
border: medium #85b9e9 dashed;
}
#example3 {
width: 250px;
height: 7em;
border: medium #85b9e9 double;
}
#example4 {
border: medium #85b9e9 groove;
}
</style>
</head>
<body>
<form method="POST" action="example.cgi">
<p><input type="text" name="item1" id="example1"></p>
<p><select name="item2" id="example2">
<option value="select1">Select1</option>
<option value="select2">Select2</option>
<option value="select3">Select3</option>
</select></p>
<p><textarea name="item3" cols="50" rows="7" id="example3"></textarea></p>
<p><input type="submit" value="submit" id="example4"></p>
</form>
</body>
</html>
- Output
This form cannot submit because of a sample.