Markdown Toolbox Logo Markdown Toolbox
Home
Blog

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.

Affiliate Link - As an Amazon Associate I earn from qualifying purchases.

Creating a Warning Box in Markdown

Wednesday, November 15, 2023

Short version

In native Markdown, there's no direct way to create a warning box. Use HTML within your Markdown or look for extensions like Admonitions in tools that support it.

Long version

Introduction

Markdown's simplicity sometimes limits how we can visually format content. For example, creating distinct warning boxes requires a workaround, as native Markdown doesn't support this feature.

Solution

<div style="background: yellow; padding: 10px;">
<p><strong>Warning:</strong> This is a warning box.</p>
</div>
!!! warning "Be careful!"
    This is a warning!

Conclusion

While Markdown doesn't natively support warning boxes, using HTML within Markdown or utilizing extensions in certain Markdown processors can help you achieve a similar effect. This approach allows you to enhance your documents with important visual cues.