> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Adding Indentation in Markdown
- URL: https://itsfoss.com/markdown-indentation/
- Published: 2023-02-09T09:15:28.000Z
- Updated: 2025-08-04T10:23:12.000Z
- Description: Here's how you can add indentation in Markdown documents.
- Author: Abhishek Prakash
- Tags: Markdown

Indentation refers to adding space before a text or a line. These days, it is particularly helpful in writing easy-to-follow programs.

In some rare cases, you may want to write text with indentation. It can help you organize or structure your Markdown document providing clarity.

**There is no** [**Markdown-specific syntax**](https://itsfoss.com/markdown-guide/) **to it**. But **you can use HTML notations** to add indentation in Markdown.

Here are various ways to add indentation in Markdown:

- **Using four spaces**
- **Using Tab**
- **Using > (greater than)**
- **Using &nbsp; or &ensp;**

You can add hard spaces, press tab key, or refer to various other methods to add indentation in a Markdown document.

For instance, if you have a list in your Markdown document with sub-points, you can add an indentation to denote the child lists and keep them separate from the parent list.

## Adding Indentation With &nbsp; or &ensp;

While this may not be the cleanest/most efficient way to add indentations to your document, it sure works. You must add the **&nbsp;** before your text or sentence to add a visible space:

```
&nbsp; This is the example line.
```

&nbsp; stands for non-breaking space that adds spaces between both sides. This is a character that renders space for HTML view.

 So, adding to the start of a word or sentence will not have an impact. You might want to use the quickest way to [add a new line in Markdown](https://itsfoss.com/markdown-new-line/) along with this for a faster experience.

![Indentation example in Markdown](https://itsfoss.com/content/images/2023/02/markdown-indentation.png)

Indentation with &nbsp; (Click to enlarge)

Similarly, you can replace it with **&ensp;** to add e-n size spaces, visually acting as two regular spaces.

You are using another markup language to add a space here. It should work, but the Markdown document that makes it possible may look a bit ugly as per your requirements.

💡

Want to learn Markdown? Refer to our [Markdown beginner's guide](https://itsfoss.com/markdown-guide/) to explore.

## Adding Indentation Using 4 Spaces With Lists

![List indentation in Markdown](https://itsfoss.com/content/images/2023/02/4-spaces.png)

Indentation with lists (Click to enlarge)

4 spaces add one level of indentation. You can test this out when you want to create sub-level of lists.

Here's what the Markdown code looks like:

```
- List
- List 2
    - Sub-level list 1 with four spaces
    - Sub-level list 2 with four spaces
```

Of course, you must know [how to create nested lists in Markdown](https://itsfoss.com/markdown-nested-lists/) before incorporating indentation.

## Adding Indentation Using Tab With Lists

Instead of 4 keystrokes, you need to press the Tab key once, and that's it.

The Tab key should be handy when adding more spaces, like adding a third sub-level in a list.

Here's what it looks like:

![List indentation in Markdown](https://itsfoss.com/content/images/2023/02/using-tabs.png)

Indentation with lists using Tab and spaces (Click to enlarge)

The Markdown code for it looks like this:

```
- List
- List 2
    - Sub-level list 1 with four spaces
		- Sub-level list 2 with two tabs
```

**Suggested Read 📖**

[How to Add Bold and Italic Text in MarkdownLearn how to emphasize text in Markdown by adding bold and italics texts.![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/2023/02/markdown-bold-italic.png)](https://itsfoss.com/markdown-bold-italic/)

## Using Indentation With Blocks

![](https://itsfoss.com/content/images/2023/02/blockquote-indentation.png)

Indentation with a blockquote under a list (Click to enlarge)

Note that > does not add an indentation but a **blockquote**.

The line must be indented if you need to add a blockquote within a list item.

Just like this:

```
* List item example

    >blockquote with indentation using 4 spaces
```

## Indentation keeps it tidy

It might sound like a small thing in a Markdown document. But indentation helps structure your sentences and lists to provide a clean layout.

I recommend using a [proper Markdown editor](https://itsfoss.com/best-markdown-editors-linux/) actually. It is easier to deal with your document that way. Still, knowledge of syntax always helps.

[11 Best Markdown Editors for LinuxMarkdown is a simple markup language. It’s lightweight and easy to learn. If you haven’t seen any markdown document yet, just head over to GitHub and enter any open-source project. The README file almost certainly will be written using Markdown. Basically, you use some ‘code’ before your text![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSMunif Tanjim![](https://itsfoss.com/content/images/wordpress/2016/10/Best-Markdown-Editors-for-Linux.jpg)](https://itsfoss.com/best-markdown-editors-linux/)

I hope this quick tip with indentation helps you create better Markdown documents. Share your thoughts in the comments below.