You'll see that the border around an HTML element

will be blue, dotted and 3 pixelsthick.

What we covered here is specific to the border property, but there are other properties that provide even more options for styling borders. Demonstration of the different border styles: A groove border. ; border-style: does not have a default value.

border-bottom: orange; Inherits this property from its parent element. This code example shows the standard way of using the CSS border shorthand: The border is convenient for creating four identical borders that surround an element. If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: W3Schools is optimized for learning, testing, and training.

JavaScript Here’s a demo that illustrates the differences between all of those style values: See the Pen CSS border by Geoff Graham (@geoffgraham) on CodePen. top-left-and-bottom-right: Is a or a denoting a radius to use for the border in the top-left and bottom-right corners of the element's box. The border property is a shorthand syntax in CSS that accepts multiple values for drawing a line around the element it is applied to. JavaScript

The last line in the following example demonstrates how easy it is to combine different CSS border styles for one element.

If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: W3Schools is optimized for learning, testing, and training.

The CSS border property is a shorthand property that sets the values of border-width, border-style and border-color for all four sides of an element.

I also

and get awesome deals & the newest tutorials to your email. the top border, right border, bottom border, and the left border).

The border shorthand property is used when you want to make all four sides the same. Like you saw in the previous page, there are many properties to consider when dealing with borders. The property can have any of the following values: Note: It is possible to have a mixed style border. The border shorthand property is used when you want to make all four sides the same.
CSS The numbers in the table specify the first browser version that fully supports the property.

User gradient colors in background, text or border. CodePen is a place to experiment, debug, and show off your HTML, CSS, and You can count on excellent support for the border property across all browsers. CSS Border Style. They have courses on all the most important front-end technologies, from React to CSS, from Vue to D3, and beyond with Node.js and Full Stack. The following example has three values – width, style, and color.

Negative values are not allowed. Border image source.
I've used WordPress since day one all the way up to v17,

The only value you need to define for the CSS border-image shorthand to work as intended is the source. All comments are held for moderation.