<color>: It sets the outline color to any valid CSS color.
Example: outline-color: black;
<!DOCTYPE html>
< html >
< head >
< title >CSS outline-color property</ title >
< style >
h1 {
color: green;
text-align: center;
outline-width: 5px;
outline-style: dashed;
/* CSS property for outline-color */
outline-color: black;
}
</ style >
</ head >
< body >
< h1 >GeeksForGeeks</ h1 >
</ body >
</ html >
|
Output:

Example: outline-color: #FF00FF;
<!DOCTYPE html>
< html >
< head >
< title >CSS outline-color property</ title >
< style >
h1 {
color: green;
text-align: center;
outline-width: 5px;
outline-style: dashed;
/* CSS property for outline-color */
outline-color: #FF00FF;
}
</ style >
</ head >
< body >
< h1 >GeeksForGeeks</ h1 >
</ body >
</ html >
|
Output:

Example: outline-color: rgb(0, 0, 255);
<!DOCTYPE html>
< html >
< head >
< title >CSS outline-color property</ title >
< style >
h1 {
color: green;
text-align: center;
outline-width: 5px;
outline-style: dashed;
/* CSS property for outline-color */
outline-color: rgb(0, 0, 255);
}
</ style >
</ head >
< body >
< h1 >GeeksForGeeks</ h1 >
</ body >
</ html >
|
Output:

Example: outline-color: hsl(0, 100%, 50%);
<!DOCTYPE html>
< html >
< head >
< title >CSS outline-color property</ title >
< style >
h1 {
color: green;
text-align: center;
outline-width: 5px;
outline-style: dashed;
/* CSS property for outline-color */
outline-color: hsl(0, 100%, 50%);
}
</ style >
</ head >
< body >
< h1 >GeeksForGeeks</ h1 >
</ body >
</ html >
|
Output:

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!