CSS border-block-style Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Logical CSS & Borders

What You’ll Learn

The border-block-style property defines the line style of the block-start and block-end borders on an element. In horizontal writing, that usually means the top and bottom border styles.

01

Block Styles

Start and end edges.

02

One Value

Same on both sides.

03

Two Values

Start vs end style.

04

solid / dashed

Common line types.

05

none Default

No border by default.

06

Writing Modes

Adapts to text flow.

Definition and Usage

The border-block-style CSS property is a shorthand that lets you define the style of the block-start and block-end borders of an element. In horizontal writing, block usually refers to the top and bottom borders.

This property is useful for setting border styles along the block axis. You can use one value for both sides or two values when block-start and block-end need different line styles.

💡
Beginner Tip

A border only appears when border-block-style is not none. Pair it with border-block-width and border-block-color, or use border-block: 4px solid blue; as shorthand.

📝 Syntax

The syntax for border-block-style accepts one or two border style values:

syntax.css
selector {
  border-block-style: <border-style> | <border-style> <border-style>;
}

Basic Example

border-block-style.css
div {
  border-block-style: solid dashed;
  border-block-width: 4px;
  border-block-color: #0073e6;
}

The style value refers to the border line type, such as solid, dashed, or dotted.

Syntax Rules

  • One value applies the same style to block-start and block-end.
  • Two values set block-start first, then block-end.
  • The initial value is none, which hides the block borders.
  • Common values include solid, dashed, and dotted.
  • Pair with border-block-width and border-block-color, or use the border-block shorthand.
  • Related longhands: border-block-start-style and border-block-end-style.

⚡ Quick Reference

QuestionAnswer
Initial valuenone
Applies toBlock-start and block-end border styles
InheritedNo
AnimatableNo
Common useSection dividers, cards, writing-mode-aware layouts

Default Value

The default value of border-block-style is none, meaning no block border is displayed until you choose a visible style.

💎 Property Values

The border-block-style property accepts standard CSS border style keywords.

ValueDescription
noneNo border is displayed
solidA single solid line
dashedA series of dashed lines
dottedA series of dotted lines
doubleTwo solid lines with space between them
grooveA 3D grooved border that looks carved in
ridgeA 3D ridged border that looks raised out
insetA 3D inset border that looks embedded
outsetA 3D outset border that looks raised
hiddenSame as none, but can still affect table layout
previewsolid
previewdotted
previewdashed
previewdouble
previewgroove
previewridge
previewinset
previewoutset

Block Style and Writing Modes

Block-start and block-end follow the block axis, so the same style rule adapts when writing mode changes.

Horizontal writing

Dashed block-start and block-end borders

Vertical writing (vertical-rl)

Logical dashed block borders

border-block-style vs border-top-style / border-bottom-style

PropertyTargetsBest for
border-block-styleLogical block-start and block-end border stylesMultilingual and writing-mode-aware layouts
border-top-style / border-bottom-stylePhysical top and bottom border stylesSimple horizontal pages with fixed top and bottom borders
border-blockWidth, style, and color together on both block sidesWhen you want one shorthand for full block borders

👀 Live Preview

A box with solid blue block-start and block-end border styles:

This element has a solid block border style on both block sides.

Uses border-block-style: solid; with border-block-width and border-block-color.

Examples Gallery

Try border-block-style with one value, two values, style keywords, and vertical writing mode.

📚 Basic Block Styles

Set block-start and block-end border styles with width and color longhands so the lines are visible.

Example 1 — Solid and Dashed Block Borders

Set different styles for the block-start and block-end borders of a div element.

border-block-style-two-value.html
<style>
  div {
    border-block-style: solid dashed;
    border-block-width: 4px;
    border-block-color: #0073e6;
    padding-block: 0.75rem;
  }
</style>

<div>
  This div has a solid block-start border and a dashed block-end border.
</div>
Try It Yourself

How It Works

With two values, the first style applies to block-start and the second to block-end. Width and color longhands make both borders visible.

Example 2 — Same Solid Style on Both Sides

Use one value to apply the same border style to block-start and block-end.

border-block-style-solid.css
.card {
  border-block-style: solid;
  border-block-width: 2px;
  border-block-color: #64748b;
  padding-block: 1rem;
}
Try It Yourself

How It Works

One value repeats on both logical block edges, which is useful for symmetric top-and-bottom borders in horizontal writing.

🎨 More Border Styles

Compare dashed and dotted styles on the block axis.

Example 3 — Dashed vs Dotted Block Borders

Use two values to compare dashed block-start and dotted block-end styles.

border-block-style-compare.css
.panel {
  border-block-style: dashed dotted;
  border-block-width: 2px;
  border-block-color: #2563eb;
  padding-block: 0.75rem;
}
Try It Yourself

How It Works

dashed dotted applies different line styles to each logical block edge while sharing width and color.

Example 4 — Block Style in Vertical Writing Mode

See how block border styles follow the writing mode instead of staying on physical top and bottom.

border-block-style-vertical.css
.vertical-panel {
  writing-mode: vertical-rl;
  border-block-style: solid;
  border-block-width: 3px;
  border-block-color: #7c3aed;
  padding: 1rem;
}
Try It Yourself

How It Works

With vertical writing, block-start and block-end move with the block axis. The same style values still apply to the correct logical edges.

🧠 How border-block-style Works

1

You choose a line style

Set solid, dashed, dotted, or another border style keyword.

Style rule
2

You add width and color

Pair the style with border-block-width and border-block-color.

Border setup
3

The browser draws both block sides

Block-start and block-end use your style values based on the current writing mode.

Logical mapping
=

Styled block borders

Your element gets clear visual separators on both logical block edges.

Universal Browser Support

border-block-style is supported in all modern browsers. Internet Explorer does not support logical border properties.

Baseline · Modern browsers

Logical border styles in today’s browsers

Chrome, Firefox, Safari, Edge, and Opera support border-block-style in current versions.

96% Modern browser support
Google Chrome69+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari12.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera56+ · Modern versions
Full support

Fallback behavior

For older browsers, use border-top-style and border-bottom-style as physical fallbacks in horizontal layouts.

💻
Internet Explorer No support · Use border-top-style and border-bottom-style instead
None
border-block-style property 96% supported

Bottom line: Use border-block-style confidently in modern logical layout systems.

Conclusion

The border-block-style property is a useful tool for controlling the appearance of block-start and block-end borders in your designs, especially when content flow may change across languages or writing modes.

Experiment with solid, dashed, dotted, and other style keywords to create visually distinct elements that enhance your page layout.

💡 Best Practices

✅ Do

  • Use one value for matching block-start and block-end styles
  • Pair style with width and color longhands for predictable results
  • Try dashed or dotted for softer separators
  • Use the border-block shorthand when setting all three parts
  • Test block border styles in vertical writing mode when needed

❌ Don’t

  • Leave the value at none and expect a visible border
  • Assume block-start always equals physical top
  • Use heavy 3D styles everywhere in modern flat UI
  • Mix physical and logical style properties without a reason
  • Forget width when using thin styles like dotted or dashed

Key Takeaways

Knowledge Unlocked

Five things to remember about border-block-style

Use these points when styling logical block borders on both sides.

5
Core concepts
02

none Default

Hidden by default.

Default
📝03

solid / dashed

Most common styles.

Values
⚙️04

Needs Width

Pair with longhands.

Setup
🔄05

Writing Mode

Adapts to flow.

Context

❓ Frequently Asked Questions

The border-block-style property sets the line style of the borders on the block-start and block-end sides of an element. In horizontal writing, those are usually the top and bottom border styles.
The initial value is none, which means no block border is displayed until you set a visible style such as solid or dashed.
Yes. With one value, both block-start and block-end use the same style. With two values, the first applies to block-start and the second to block-end.
If the value is none, no border appears. You also need border-block-width greater than zero and usually border-block-color, or use the border-block shorthand.
Physical top and bottom style properties always target fixed edges. border-block-style follows the writing mode and stays on the logical block-start and block-end sides.

Practice in the Live Editor

Open the HTML editor, try border-block-style, and preview logical block borders instantly.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful