CSS border-block-start-width Property

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

What You’ll Learn

The border-block-start-width property sets how thick the block-start border is on an element. In horizontal writing, that usually means the top border width.

01

Block-Start Width

One logical edge only.

02

thin / medium / thick

Keyword sizes.

03

px / em / rem

Exact length units.

04

medium Default

Browser default size.

05

Needs Style

Pair with style/color.

06

Writing Modes

Adapts to text flow.

Definition and Usage

The border-block-start-width property is a logical property that sets the width of the border on the start side of the block in an element. The start side is determined by the writing mode of the document or the element’s container.

This property is part of CSS Logical Properties, which provide a way to control layout using terms that depend on writing mode, directionality, and text orientation.

💡
Beginner Tip

border-block-start-width only sets thickness. Add border-block-start-style: solid; and border-block-start-color: black; so the border is visible, or use border-block-start: 5px solid black; as shorthand.

📝 Syntax

The syntax for border-block-start-width is straightforward. It accepts keyword values or length units.

syntax.css
selector {
  border-block-start-width: <length> | thin | medium | thick;
}

Basic Example

border-block-start-width.css
div {
  border-block-start-width: 5px;
  border-block-start-style: solid;
  border-block-start-color: black;
}

The value can be a keyword such as thin or a length such as 5px, 0.25em, or 1rem.

Syntax Rules

  • The initial value is medium, typically around 3 to 4 pixels.
  • Keywords: thin, medium, and thick.
  • Length values use units like px, em, or rem.
  • Pair with border-block-start-style and border-block-start-color for full control.
  • Use border-block-start shorthand when setting width, style, and color together.

⚡ Quick Reference

QuestionAnswer
Initial valuemedium
Applies toBlock-end border width only
InheritedNo
AnimatableYes, as a length
Common useCard accents, section headers, emphasis lines, callout borders

Default Value

The default value of border-block-start-width is medium, which typically corresponds to a width of around 3 to 4 pixels depending on the browser’s default settings.

💎 Property Values

The border-block-start-width property accepts keyword values and length units.

ValueDescription
thinA thin border width (typically 1px)
mediumA medium border width (default, typically 3–4px)
thickA thick border width (typically 5–6px)
<length>A specific width using a length unit like px, em, or rem
initialSets the property to its default value
inheritInherits the property value from its parent element
previewthin
previewmedium
previewthick
preview1px
preview4px
preview8px

Block-Start Width and Writing Modes

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

Horizontal writing

5px block-start (top) border width

Vertical writing (vertical-rl)

Logical block-start width

border-block-start-width vs border-top-width

PropertyTargetsBest for
border-block-start-widthLogical block-start border thicknessMultilingual and writing-mode-aware layouts
border-top-widthPhysical top border thicknessSimple horizontal pages with fixed top accents
border-block-startWidth, style, and color togetherWhen you want one shorthand for the full block-start border

👀 Live Preview

A box with a 5px block-start border width:

This element has a 5px block-start border width.

Uses border-block-start-width: 5px; with solid style and black color.

Examples Gallery

Try border-block-start-width with pixel lengths, keyword sizes, and vertical writing mode.

📚 Basic Block-Start Widths

Set the block-start border width with style and color longhands so the line is visible.

Example 1 — 5px Block-Start Border Width

Set border-block-start-width to 5px for a div element.

border-block-start-width-5px.html
<style>
  div {
    border-block-start-width: 5px;
    border-block-start-style: solid;
    border-block-start-color: black;
    padding-block-start: 0.75rem;
  }
</style>

<div>
  This is a div with a block-start border width of 5px.
</div>
Try It Yourself

How It Works

5px sets an exact thickness on the block-start edge. Style and color longhands make the border visible.

Example 2 — thin, medium, and thick Keywords

Compare keyword border widths on the block-start edge.

border-block-start-width-keywords.css
.thin {
  border-block-start: thin solid #64748b;
}
.medium {
  border-block-start-width: medium;
  border-block-start-style: solid;
  border-block-start-color: #2563eb;
}
.thick {
  border-block-start: thick solid #dc2626;
}
Try It Yourself

How It Works

Keywords give quick sizing without exact pixels. medium is the initial default value.

📏 Length Units and Writing Modes

Use precise length values and see how block-start width adapts in vertical writing mode.

Example 3 — px, em, and rem Length Units

Set exact block-start border widths with common CSS length units.

border-block-start-width-units.css
.px-border {
  border-block-start: 2px solid #2563eb;
}
.em-border {
  border-block-start-width: 0.25em;
  border-block-start-style: solid;
  border-block-start-color: #059669;
}
.rem-border {
  border-block-start: 0.5rem solid #7c3aed;
}
Try It Yourself

How It Works

px gives fixed pixels. em scales with font size. rem scales with the root font size.

Example 4 — Block-Start Width in Vertical Writing Mode

See how block-start border width follows the block axis in vertical text.

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

How It Works

With vertical writing, block-start moves with the block axis. The same width value still applies to the correct logical edge.

🧠 How border-block-start-width Works

1

You choose a thickness

Set a keyword like thin or a length like 5px.

Width rule
2

You add style and color

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

Border setup
3

The browser draws block-start only

Only the logical block-start edge uses that thickness based on writing mode.

Logical mapping
=

Sized block-start divider

Your element gets a clear separator with the thickness you chose.

Universal Browser Support

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

Baseline · Modern browsers

Logical border widths in today’s browsers

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

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

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

Conclusion

The border-block-start-width property is a flexible way to control the width of the start-side border, especially in documents that use different writing modes or text orientations. By using logical properties like this, you can create layouts that adapt to various languages and writing directions.

💡 Best Practices

✅ Do

  • Use 1px or 2px for subtle UI dividers on block-start
  • Pair width with style and color longhands for predictable results
  • Use rem when you want thickness to scale with root font size
  • Use the border-block-start shorthand when setting all three parts
  • Test block-start widths in vertical writing mode when needed

❌ Don’t

  • Set width alone and forget a visible border style
  • Assume block-start always equals physical top
  • Use very thick borders everywhere in minimal UI designs
  • Mix physical and logical width properties without a reason
  • Rely on medium when you need exact pixel control

Key Takeaways

Knowledge Unlocked

Five things to remember about border-block-start-width

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

5
Core concepts
⚙️02

medium Default

Browser default size.

Default
📏03

thin / thick

Quick keywords.

Values
📝04

px / em / rem

Exact lengths.

Units
🔄05

Writing Mode

Adapts to flow.

Context

❓ Frequently Asked Questions

The border-block-start-width property sets the thickness of the border on the block-start side of an element. In horizontal writing, that is usually the top border width.
The initial value is medium, which is typically around 3 to 4 pixels depending on the browser.
Width alone does not always show a border. You also need a visible border-block-start-style such as solid and usually a color, or use the border-block-start shorthand.
border-top-width always sets the physical top edge thickness. border-block-start-width follows the writing mode and stays on the logical block-start side.
Length values like 1px, 2px, and 4px are most common in modern UI. Keywords thin, medium, and thick are useful for quick sizing.

Practice in the Live Editor

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