Markdown Toolbox Logo Markdown Toolbox
Home
Blog

Affiliate Link

Amazon Kindle Scribe digital notebook with a 10 inch Paperwhite display Amazon Kindle Scribe digital notebook with a 10 inch Paperwhite display

Still on my wishlist, but it is promising. The smaller kindles don't let me see enough of PDFs for technical sections.

Adjusting space between lines in markdown

Friday, March 8, 2024

Short Version

Markdown does not directly support altering the space between lines. Use HTML and CSS for more control over line spacing.

<p style="line-height: 2;">Your text here</p>

Long Version

Introduction

Standard Markdown syntax does not include a way to adjust the spacing between lines of text. For documents where precise control over text appearance is necessary, embedding HTML and inline styles is a workaround.

Example

To change the line spacing in a section of your document, you can wrap the text in <p> tags with a style attribute specifying the line-height.

<p style="line-height: 150%;">This is some text with adjusted line spacing.</p>

Best Practices and Common Pitfalls


Author's Note: Integrating HTML into Markdown is a powerful tool but can detract from the simplicity that Markdown is known for. Use judiciously.