CSS border-block-start Property

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

What You’ll Learn

The border-block-start property is a logical CSS shorthand for styling the border on the block-start side of an element. In horizontal writing, that usually means the top edge.

01

Block-Start

Start of block flow.

02

Shorthand

Width, style, color.

03

Longhands

Width, style, color split.

04

One Edge

Only block-start border.

05

Writing Modes

Adapts to text flow.

06

vs border-top

Physical vs logical.

Definition and Usage

The border-block-start CSS property sets the style, width, and color of the border on the start side of an element’s block axis. In languages such as English, where text flows from left to right and top to bottom, the block-start edge corresponds to the top edge.

This property is particularly useful when designing for different writing modes, ensuring that the border adapts to the flow of content in various languages and layout directions.

💡
Beginner Tip

In a normal English page, border-block-start: 5px solid blue; looks like a top border. The benefit is that it stays on the correct logical edge when writing mode changes.

📝 Syntax

The border-block-start property can be set using one or more of the following values. Each value is optional, but at least one must be provided for a visible border:

syntax.css
selector {
  border-block-start: <border-width> <border-style> <border-color>;
}

Basic Example

border-block-start.css
p {
  border-block-start: 5px solid blue;
}

You can also set the parts individually with longhand properties:

border-block-start-width

Sets thickness on block-start only.

border-block-start-style

Sets line style on block-start only.

border-block-start-color

Sets color on block-start only.

Syntax Rules

  • Values follow the usual border order: width, then style, then color.
  • A visible style such as solid is required for the border to show.
  • Only the block-start edge is affected; other sides keep their existing borders.
  • Pair with border-block-end when you need both logical block edges styled.
  • Use padding-block-start to add space between content and the border.

⚡ Quick Reference

QuestionAnswer
Initial valuemedium none currentColor
Applies toBlock-start border side only
InheritedNo
AnimatablePartially (color and width in supporting browsers)
Common useCard accents, section headers, top rules, callout borders

Default Value

The default value of the border-block-start property comes from its longhand parts:

default.css
border-block-start: medium none currentColor;
  • border-block-start-widthmedium (the default width of the border)
  • border-block-start-stylenone (no border style is applied)
  • border-block-start-colorcurrentColor (uses the current text color for the border color)

Because the default style is none, no border is visible until you set a visible style such as solid.

💎 Property Values

The border-block-start shorthand accepts the same value types as other border shorthands.

ValueDescription
<border-width>Specifies the width of the border (e.g., thin, medium, thick, or any valid length value)
<border-style>Defines the style of the border (e.g., solid, dashed, dotted, double, none)
<border-color>Sets the color of the border (e.g., named colors, hex values, RGB, HSL)

Block-Start and Writing Modes

The block-start edge follows the block axis, so the same rule adapts when writing mode changes.

Horizontal writing → block-start = top Vertical writing → block-start moves with flow

Horizontal writing

Border on the block-start (top) edge

Vertical writing (vertical-rl)

Logical block-start border

border-block-start vs border-top

PropertyTargetsBest for
border-block-startLogical block-start edgeMultilingual layouts and writing-mode-aware components
border-topPhysical top edge alwaysSimple horizontal pages with fixed top borders
border-block-endLogical block-end edgeBottom-or-end edge styling in logical layouts
border-blockBoth block-start and block-endWhen both logical block edges need the same border

👀 Live Preview

A box with a 5px solid blue border on the block-start side:

This element has a border on the block-start side.

In horizontal writing, border-block-start: 5px solid #2563eb; appears as a top border.

Examples Gallery

Try border-block-start on paragraphs, card accents, dashed headers, and vertical writing mode.

📚 Basic border-block-start

Apply a single logical border on the block-start edge with one shorthand rule.

Example 1 — Solid Blue Block-Start Border

Apply a solid blue border to the block-start side of a paragraph element.

border-block-start-basic.html
<style>
  p {
    border-block-start: 5px solid blue;
    padding-block-start: 0.75rem;
  }
</style>

<p>
  This paragraph has a solid blue border on the block-start side. In English, this is the top edge.
</p>
Try It Yourself

How It Works

The shorthand styles only the block-start edge. In horizontal writing, that appears as a top border above the paragraph text.

Example 2 — Card Accent Border

Use a block-start border as a colored accent line on a card or callout box.

border-block-start-card.css
.card {
  border-block-start: 4px solid #059669;
  padding: 1rem;
  background: #ecfdf5;
  border-radius: 0.5rem;
}
Try It Yourself

How It Works

A block-start border creates a strong visual accent at the start of the block flow, which is a common pattern for tips, alerts, and cards.

🎨 Border Styles

Change the style keyword or use longhands for more control on the block-start edge.

Example 3 — Dashed Block-Start Border with Longhands

Set block-start border parts individually with longhand properties.

border-block-start-longhand.css
.section-header {
  border-block-start-width: 2px;
  border-block-start-style: dashed;
  border-block-start-color: #64748b;
  padding-block-start: 0.75rem;
}
Try It Yourself

How It Works

Longhands give fine control over width, style, and color. Together they produce the same result as the shorthand on the block-start edge only.

Example 4 — border-block-start in Vertical Writing Mode

See how the block-start border follows the writing mode instead of staying on the physical top.

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

How It Works

With writing-mode: vertical-rl, block-start no longer means physical top. The same property still targets the correct logical edge.

🧠 How border-block-start Works

1

The browser finds block-start

Writing mode decides which physical edge is the block-start side.

Writing mode
2

You set width, style, and color

Write one shorthand such as border-block-start: 5px solid blue;.

CSS rule
3

Only that edge is styled

Other borders remain unchanged unless you set them separately.

Single edge
=

Logical start-edge border

Your element gets a clear border on the logical start of the block flow.

Universal Browser Support

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

Baseline · Modern browsers

Logical border shorthands in today’s browsers

Chrome, Firefox, Safari, Edge, and Opera support border-block-start 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 as a physical fallback in horizontal layouts.

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

Bottom line: Test across browsers when your site supports multiple writing modes.

Conclusion

The border-block-start property is an excellent tool for adding a border to the start of an element’s block in a way that respects the writing mode of the document. This allows for more flexible and language-sensitive designs.

By using this property, you can control the appearance of your website’s elements more precisely and ensure a consistent visual experience across different languages and writing directions.

💡 Best Practices

✅ Do

  • Use border-block-start for card accents and section header rules
  • Include a visible style such as solid in the shorthand
  • Pair with padding-block-start for comfortable spacing
  • Use longhands when you need to change only one part of the border
  • Test block-start borders in vertical writing mode when needed

❌ Don’t

  • Assume block-start always equals physical top
  • Forget a style keyword and expect a visible border
  • Mix physical and logical border properties without a reason
  • Use thick block-start borders on every element in minimal UI
  • Skip browser testing for multilingual layouts

Key Takeaways

Knowledge Unlocked

Five things to remember about border-block-start

Use these points when styling the logical block-start edge.

5
Core concepts
⚙️02

medium none currentColor

Default = hidden.

Default
📝03

Three Longhands

Width, style, color.

Parts
🖼️04

Card Accents

Common UI pattern.

Use case
🔄05

Writing Mode

Adapts to flow.

Context

❓ Frequently Asked Questions

The border-block-start property is a shorthand that sets the width, style, and color of the border on the block-start side of an element. In horizontal writing, that is usually the top border.
The shorthand defaults to medium none currentColor, meaning no visible border until you set a style other than none.
border-top always targets the physical top edge. border-block-start follows the writing mode, so it stays correct when text flow or direction changes.
It is shorthand for border-block-start-width, border-block-start-style, and border-block-start-color.
Use it when you need a border on only the block-start edge in a logical layout, such as a card accent line or section header rule that should adapt to writing mode.

Practice in the Live Editor

Open the HTML editor, try border-block-start, and preview logical block-start 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