No, you cannot set them all in a single statement.
At the general case, you need at least three properties:

border-color: red green white blue;
border-style: solid dashed dotted solid;
border-width: 1px 2px 3px 4px;

However, that would be quite messy. It would be more readable and maintainable with four:

border-top:    1px solid  #ff0;
border-right:  2px dashed #f0F;
border-bottom: 3px dotted #f00;
border-left:   5px solid  #09f;
Answer from Kobi on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Reference › Properties › border-top-width
border-top-width - CSS | MDN
October 30, 2025 - The border-top-width CSS property sets the width of the top border of an element.
🌐
W3Schools
w3schools.com › cssref › pr_border-top_width.php
CSS border-top-width property
The border-top-width property sets the width of an element's top border.
🌐
Tailwind CSS
tailwindcss.com › docs › border-width
border-width - Borders - Tailwind CSS
Use border or border-<number> utilities like border-2 and border-4 to set the border width for all sides of an element:
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › border-top
border-top - CSS - MDN Web Docs - Mozilla
August 13, 2025 - border-top = <line-width> || <line-style> || <color> <line-width> = <length [0,∞]> | thin | medium | thick <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
🌐
W3Schools
w3schools.com › cssref › pr_border-top.php
CSS border-top property
border-top: border-width border-style border-color|initial|inherit; ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: [email protected] · If you want to report an error, or if ...
🌐
GeeksforGeeks
geeksforgeeks.org › css › css-border-top-width-property
CSS border-top-width Property - GeeksforGeeks
August 26, 2024 - The border-top-width property in CSS is used to set a specific width to the top border of an element.
🌐
Codrops
tympanus.net › codrops › css_reference › border-top-width
border-top-width | Codrops
February 3, 2015 - The border-top-width property is used to set the width of the top border of an element. The width of the border can be e
Find elsewhere
🌐
Fandom
htmlcss.fandom.com › wiki › Border-top-width
Border-top-width | HTML & CSS Wiki | Fandom
The border-top-width property is used in CSS and certain HTML elements. This property controls the thickness (width) of the top side of the border of an element's rendering box. Negative values are not allowed.
🌐
Uwinnipeg
theory.uwinnipeg.ca › css › box › border-top-width.html
Top Border Width
The border-top-width property is used to specify the width of an element's top border. The value may be one of three keywords, which are not affected by font size, or a length, which can be used to achieve relative widths.
🌐
HubSpot
blog.hubspot.com › website › css-border
How to Create and Style Borders in CSS
February 23, 2023 - Let’s take a look at examples of all these values below. See the Pen zYZyMmx by Christina Perricone (@hubspot) on CodePen. The CSS border-width property specifies the width of the border.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › border-width
border-width - CSS - MDN Web Docs - Mozilla
August 13, 2025 - border-width = <'border-top-width'>{1,4} <border-top-width> = <line-width> <line-width> = <length [0,∞]> | thin | medium | thick
🌐
W3docs
w3docs.com › learn-css › border-top-width.html
CSS border-top-width Property
The border-top-width property is used to define the width of an element’s top border.
🌐
HowDev
how.dev › answers › what-is-the-css-border-top-property
What is the CSS border-top property?
September 28, 2021 - Defines the top border's width, style, and color; requires border-top-style.
🌐
TutorialsPoint
tutorialspoint.com › css › css_border-top-width.htm
CSS - border-top-width Property
CSS border-top-width property determines the width of the top border of an element. The border-style or border-top-style must be declared before using this property.
🌐
W3Schools
w3schools.com › cssref › pr_border-top_style.php
CSS border-top-style property
div { border-top-style: groove; border-top-color: coral; border-top-width: 7px; } Try it Yourself »
🌐
HTML Dog
htmldog.com › references › css › properties › border-top-width
CSS Property: border-top-width | HTML Dog
The width of the top border of a box, above the content and padding areas and before the top margin area.