The margin-inline-start property sets outer spacing on the inline-start side of an element using logical layout instead of physical left margin.
01
Inline-Start
Start of inline axis.
02
Logical
Direction aware.
03
Longhand
One side only.
04
Indent
Offset content.
05
RTL safe
International layouts.
06
Default 0
No spacing.
Fundamentals
Introduction
The margin-inline-start property in CSS is used to set the logical start margin of an element, depending on the writing mode, text directionality, and text orientation.
This property is useful for creating layouts that support different writing modes, such as left-to-right (LTR) and right-to-left (RTL) languages, without needing to adjust the margin values manually for each direction.
Definition and Usage
Apply margin-inline-start when you need spacing before an element on the inline axis without affecting the inline-end side. Common uses include indenting paragraphs, offsetting icons beside text, and building flexible multilingual layouts.
💡
Beginner Tip
In normal horizontal English pages, margin-inline-start: 20px behaves like margin-left: 20px. If text direction is RTL, the margin moves to the other side automatically.
Foundation
📝 Syntax
The syntax for the margin-inline-start property is as follows:
syntax.css
element{margin-inline-start:value;}
Here, value can be any valid CSS length, percentage, or global value.
Basic Example
margin-inline-start.css
p{margin-inline-start:20px;}
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
0
Applies to
All elements except table display types that use separate border model
Inherited
No
Animatable
Yes, as a length
Related shorthand
margin-inline
Reference
💎 Property Values
Value
Example
Meaning
Length
margin-inline-start: 20px;
Fixed value in px, em, rem, etc.
Percentage
margin-inline-start: 10%;
Percentage relative to the inline size of the containing block
auto
margin-inline-start: auto;
The browser calculates the margin automatically
initial
margin-inline-start: initial;
Sets the property to its default value (0)
inherit
margin-inline-start: inherit;
Inherits the property from the parent element
inline-start
Default
🎯 Default Value
The default value of the margin-inline-start property is 0, which means no margin is applied to the start of the inline axis. Override it when you need spacing before an element on the inline axis.
Preview
👀 Live Preview
A box with inline-start margin inside a dashed container:
margin-inline-start: 1.25rem
Hands-On
Examples Gallery
Add inline-start margin to a paragraph, indent nested content, see RTL direction behavior, and compare with physical margin-left.
🔢 Inline-Start Spacing
Start with the reference example — apply margin at the start of the inline axis on a paragraph.
Example 1 — Paragraph Inline-Start Margin
Apply a margin at the start of the inline axis to a paragraph element.
margin-inline-start.html
<style>p{margin-inline-start:20px;}</style><p>This paragraph has a margin at the start of the inline axis.</p>
In this example, the paragraph has a margin of 20px at the start of the inline axis. If the text direction is LTR, the margin will be on the left; if the text direction is RTL, the margin will be on the right.
Choose logical properties when layouts must adapt to direction. Physical margins are fine for simple single-language LTR pages.
Context
Logical vs Physical Margins
Logical
Physical (horizontal LTR)
margin-inline-start
margin-left
margin-inline-end
margin-right
margin-block-start
margin-top
margin-block-end
margin-bottom
A11y
♿ Accessibility
Preserve reading order — Logical margins respect direction, which helps RTL and multilingual users.
Keep indentation meaningful — Inline-start margin can indent quotes and nested content without breaking semantics.
Avoid negative margins on focusable elements — Negative inline-start margins can overlap previous interactive controls.
Test zoom and small screens — Large inline-start margins can push content off-screen on narrow viewports.
Use semantic HTML — Margins adjust spacing; structure still comes from proper elements.
🧠 How margin-inline-start Works
1
You set inline-start spacing
Apply margin-inline-start with a length, percentage, or keyword.
CSS rule
2
Browser resolves inline-start
The inline-start side is determined by writing mode and text direction.
Logical layout
3
Outer space is added
Transparent margin appears before the element on the inline axis.
Box model
=
←
Clear offset
Content before the element stays separated on the inline axis.
Compatibility
🖥 Browser Compatibility
The margin-inline-start property is widely supported in modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. It provides a logical, rather than physical, way of setting margins, making it particularly useful for multilingual websites.
✓ Modern browsers · Logical properties
Reliable in current browser versions
margin-inline-start is part of the CSS Logical Properties module. Use it in modern projects; provide physical fallbacks only if you must support very old browsers.
96%Global browser support
Google Chrome87+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari14.1+ · macOS & iOS
Full support
Microsoft Edge87+ · Chromium
Full support
Opera73+ · Modern
Full support
margin-inline-start property96% supported
Bottom line: Safe for modern sites. For inline-end spacing, see margin-inline-end.
Wrap Up
🎉 Conclusion
The margin-inline-start property is a powerful tool for web developers looking to create flexible and responsive layouts that support different writing modes and text directions.
By using this property, you can ensure consistent spacing and alignment across various languages and cultural settings. Experiment with different values and see how this property can enhance your website’s design and usability.
Use margin-inline-start for indents and horizontal offsets
Prefer rem for scalable inline-start spacing
Pair with logical padding and borders for consistent layouts
Test with direction: rtl on international UIs
Combine with margin-inline-end for full inline-axis control
❌ Don’t
Assume inline-start always means left in every layout
Mix logical and physical margins on the same axis without reason
Use huge fixed margins that break mobile layouts
Rely on physical left/right when direction may change
Skip browser testing for older Safari versions
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about margin-inline-start
Use these points when spacing elements on the inline-start side.
5
Core concepts
←01
Inline-Start
Start of axis.
Purpose
002
Default 0
No spacing.
Default
LH03
Longhand
One side.
Type
RTL04
Direction
Adapts flow.
Logical
i18n05
RTL safe
Global layouts.
Use case
❓ Frequently Asked Questions
The margin-inline-start property sets outer spacing on the inline-start side of an element. In horizontal left-to-right writing, that is usually the left margin.
The default value is 0, meaning no inline-start margin unless you set one explicitly.
margin-left always targets the physical left edge. margin-inline-start follows text direction, so spacing stays correct in RTL layouts.
margin-inline is shorthand for margin-inline-start and margin-inline-end. Use margin-inline-start when you only need spacing on the inline-start side.
Use it for spacing before an element on the inline axis, such as indenting content, offsetting icons, or aligning blocks in multilingual layouts.