Border Top
Border Top
The border-top
property specifies the width, line style, and color of the top border of an element. It is a shorthand property for setting in one declaration the width, the style, and the color of an element's top border.
Examples
Border Top Property
Setting the top border of a <h1>
for different elements.
h1 {
border-top: 5px solid red;
}
Syntax
border-top: border-width border-style border-color;
Tips
- If
border-style
is not provided, the default is no border. - If no
border-color
is chosen, the border will match the current text color. - If
border-width
is not provided, the default is medium.
Additional Information
For more information, see http://www.w3schools.com/cssref/pr_border-top.asp.
Found a bug in the documentation? Let us know at support@code.org.