How to indent a few lines in Markdown markup?

There’s no way to do that in markdown’s native features. However markdown allows inline HTML, so writing

      This will appear with six space characters in front of it

will produce:

      This will appear with six space characters in front of it

If you have control over CSS on the page, you could also use a tag and style it, either inline or with CSS rules.

Either way, markdown is not meant as a tool for layout, it is meant to simplify the process of writing for the web, so if you find yourself stretching its feature set to do what you need, you might look at whether or not you’re using the right tool here. Check out Gruber’s docs:

http://daringfireball.net/projects/markdown/syntax#html

Leave a Comment