Tutorials Point


  CSS Home

  CSS Reference
  Pseudo Classes & Elements

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

CSS - border-top-color


previous next AddThis Social Bookmark Button


Advertisements

Description:

Sets the color of an element's top border; default is the color of the element.

Possible Values:

  • color: Any valid color value.

Applies to:

All the HTML elements.

DOM Syntax:

object.style.borderTopColor="red";

Example:

Here is the example which shows effect of this property:

<style type="text/css">
p.example1{
   border:1px solid;
   border-bottom-color:#009900; /* Green */
   border-top-color:#FF0000;    /* Red */
   border-left-color:#330000;   /* Black */
   border-right-color:#0000CC;  /* Blue */
}
</style>
<p class="example1">
This example is showing top border in red color.
</p>

This will produce following result:

This example is showing top border in red color.

To Become more comfortable - Do Online Practice



previous next Printer Friendly

Advertisements


  

Advertisements