Description:
An outline is a line that is drawn around elements, outside the border edge, to make the element "stand out". The outline-style property sets the style of the outlines.
Possible Values:
-
Value |
Description |
none |
Default. Defines no outlines |
dotted |
Defines a dotted outline |
dashed |
Defines a dashed outline |
solid |
Defines a solid outline |
double |
Defines two lines around the element. The width of the two lines are the same as the outline-width value |
groove |
Defines a 3D grooved outline. The effect depends on the outline-color value |
ridge |
Defines a 3D ridged outline. The effect depends on the outline-color value |
inset |
Defines a 3D inset outline. The effect depends on the outline-color value |
outset |
Defines a 3D outset outline. The effect depends on the outline-color value |
Applies to:
All the HTML elements
DOM Syntax:
object.style.outlineColor="red"; |
Example:
Here is the example:
<p style="outline-width:thin; outline-style:solid;
outline-color:red">
This text is having thin solid red outline.
</p>
<br />
<p style="outline-width:thick; outline-style:dashed;
outline-color:#009900">
This text is having thick dashed green outline.
</p>
<br />
<p style="outline-width:5px;outline-style:dotted;
outline-color:rgb(13,33,232)">
This text is having 5x dotted blue outline.
</p>
|
This will produce following result:
This text is having thin solid red outline.
This text is having thick dashed green outline.
This text is having 5x dotted blue outline. |
|