Markdown Icons - How to Add Icons in Markdown (Font Awesome, Emoji, SVG Guide)
What Are Markdown Icons?
Standard Markdown doesn't have a built-in icon syntax. The CommonMark spec has no special markup for inserting icons. But that doesn't mean you can't use icons in Markdown documents — there are several well-established methods, each with different trade-offs and platform compatibility.
Markdown icons are small visual elements inserted into documents through HTML tags, image references, emoji characters, or Markdown extension plugins. They're commonly used for navigation markers, status indicators, category labels, or just making documents look better.
Five Methods to Add Icons in Markdown
Depending on your use case, here are the main approaches:
| Method | Compatibility | Complexity | Best For |
|---|---|---|---|
| Emoji | Almost everywhere | Low | Quick markers, status indicators |
| Unicode symbols | Almost everywhere | Low | Arrows, math, special characters |
| Font Awesome (HTML) | Platforms that load CSS | Medium | Self-hosted sites, blogs |
| SVG image reference | Platforms supporting <img> | Medium | GitHub READMEs, cross-platform docs |
| Markdown extensions | Specific toolchains | High | Hugo/MkDocs/Jekyll static sites |
Let's walk through each one.
Adding Icons with Emoji
This is the simplest and most universal approach. Almost every Markdown renderer supports emoji — GitHub, GitLab, VS Code preview, Typora, you name it.
Just drop emoji characters directly into your text:
Build status: ✅ Passing | ❌ Failing | ⏳ In Progress
Feature list:
- 🔍 Search
- 📊 Analytics
- 🔔 Notifications
- 🛡️ SecurityGitHub and GitLab also support colon-wrapped emoji shortcodes:
:tada: Release published!
:rocket: Version update
:warning: Important noticeHonestly, if you just want to add some visual flair to your document, emoji is the go-to choice — no configuration needed, just copy and paste.
The caveat: emoji appearance depends on the user's operating system and font. The same emoji can look noticeably different on Windows vs macOS. If you need precise control over icon size and color, emoji won't cut it.
Using Unicode Symbols as Icons
Unicode contains a treasure trove of symbols that work perfectly as icons. Like emoji, they need no external dependencies — but unlike emoji, their rendering is generally more consistent across platforms since they go through font rendering.
Common Unicode symbols for use as icons:
**Arrows:**
→ ← ↑ ↓ ⇒ ⇐ ⇑ ⇓ ➜ ➤ ▶ ◀
**Shapes:**
● ○ ■ □ ▲ △ ◆ ◇ ★ ☆ ✓ ✗
**Math / Logic:**
≈ ≠ ≤ ≥ ± × ÷ ∞ √ ∑ ∏
**Other useful ones:**
☎ ✉ ⌛ ⚡ ♻ ⚠ ☘ ✈ ☕Paste them directly into Markdown:
### ✅ Completed Features
- User login → Password check ⇒ Token generation
- Data export: CSV √ | JSON √ | XML ✗
### ⚠️ Important Notes
- Alert triggers when CPU usage ≥ 80%
- Request timeout ≈ 30sI've found Unicode symbols work especially well in tables for status markers or in technical docs for showing logical relationships. They look more "professional" than emoji and don't suffer from wild rendering differences.
Using Font Awesome Icons
Font Awesome is one of the most popular icon libraries, offering thousands of vector icons. There are two main ways to use it in Markdown.
Method 1: HTML Tags (Requires CSS Loading)
If your Markdown renders on a web page (like your own blog or documentation site), you can load Font Awesome CSS in the page template's <head>:
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">Then use HTML directly in your Markdown files:
Project features:
- <i class="fa-solid fa-user"></i> User management
- <i class="fa-solid fa-gear"></i> System settings
- <i class="fa-solid fa-chart-line"></i> Analytics
- <i class="fa-solid fa-shield-halved"></i> Security
Buttons: <i class="fa-solid fa-download"></i> Download |
<i class="fa-solid fa-trash"></i> DeleteFont Awesome also supports size and style controls:
<i class="fa-solid fa-house"></i> Default size
<i class="fa-solid fa-house fa-lg"></i> Large
<i class="fa-solid fa-house fa-2x"></i> 2x size
<i class="fa-solid fa-house fa-3x"></i> 3x size
<i class="fa-solid fa-spinner fa-spin"></i> Spinning animationThe critical requirement: Font Awesome CSS must be loaded on the page. If it's your own site, that's easy. But on GitHub READMEs, this won't work — GitHub strips custom CSS and JavaScript for security. The <i class="fa-solid fa-user"> tag gets preserved but the icon styles never load.
I once wrote a project README loaded with Font Awesome icons, pushed it up, and saw nothing but blank space — learned that lesson the hard way. GitHub's HTML allowlist only supports a small set of tags (<img>, <a>, <br>, etc.), and custom class styling doesn't get applied.
Method 2: Markdown Extension Plugins
If you're using static site generators like MkDocs, Hugo, or Jekyll, plugins let you use shortcodes to insert icons.
MkDocs + fontawesome-markdown:
Install the extension:
pip install fontawesome-markdownEnable it in mkdocs.yml:
markdown_extensions:
- fontawesome_markdownThen use it in Markdown:
I :fa-coffee: you
Navigation: :fa-home: Home | :fa-cog: SettingsHugo shortcodes:
Hugo has built-in icon shortcode syntax that works with icon libraries:
{{</* icon "github" */>}}
{{</* icon "heart" */>}}One thing to note: fontawesome-markdown for Python was last updated in 2018 and only supports Font Awesome v5.2. If you need v6 icons, look for alternative extensions or write your own.
Adding Icons with SVG Images
This approach is particularly useful for GitHub READMEs. While GitHub doesn't support Font Awesome CSS, it does support <img> tags — so we can reference Font Awesome's SVG files directly.
Remote SVG References
Font Awesome SVGs are hosted in their GitHub repository and can be referenced by URL:
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/crown.svg" width="20" height="20"> Premium feature
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/rocket.svg" width="20" height="20"> Quick start
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/star.svg" width="20" height="20"> RecommendedControl size through width and height attributes. Color is trickier — SVGs default to black. To change colors, you can use CSS filter properties (if your platform supports them) or download and edit the SVG's fill value.
Using shields.io Badges
shields.io provides a flexible "icon + text" solution that's extremely common in open-source READMEs:


Strictly speaking, these are "badges" not "icons," but they serve a similar purpose — quickly conveying project status information. shields.io supports custom colors, text, and logos.
Platform Compatibility Comparison
Platform support for icons varies significantly. Here's a comparison table to help you choose the right method.
| Platform | Emoji | Unicode | Font Awesome (HTML) | SVG Image | Extensions |
|---|---|---|---|---|---|
| GitHub | ✅ | ✅ | ❌ CSS stripped | ✅ | ❌ |
| GitLab | ✅ | ✅ | ✅ HTML supported | ✅ | Partial |
| VS Code Preview | ✅ | ✅ | ✅ | ✅ | Plugin-dependent |
| Typora | ✅ | ✅ | ✅ | ✅ | Some themes |
| MkDocs | ✅ | ✅ | ✅ | ✅ | ✅ |
| Hugo | ✅ | ✅ | ✅ | ✅ | ✅ Shortcodes |
| Jekyll | ✅ | ✅ | ✅ | ✅ | ✅ |
Key takeaway: Emoji and Unicode symbols are the only methods that work everywhere. If your document needs to be cross-platform, prioritize these two. Font Awesome HTML tags only work well in environments where you control the page CSS.
Dark Theme Icon Visibility
This is an easily overlooked detail. If you use SVG image references (common in GitHub READMEs), the default SVGs are black. Fine on light backgrounds, but if a user has dark mode enabled (GitHub Dark), black icons on dark backgrounds become invisible.
Solutions:
- Use colored SVGs with transparent backgrounds — Edit the
fillvalue in the SVG file - Use shields.io instead — Badges auto-adapt to themes
- Use emoji — Emoji renders correctly in both light and dark themes
<!-- May be invisible in dark mode -->
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/star.svg" width="16">
<!-- Better alternatives -->
⭐ Star us on GitHub
Choosing the Right Approach by Scenario
Based on real-world use cases, here are my recommendations:
Writing a GitHub README:Use emoji for simple markers, shields.io for status badges. Avoid Font Awesome HTML tags (they won't render). If you specifically need Font Awesome-style icons, go the SVG image route.
Writing a tech blog / documentation site:If your site template already loads Font Awesome, using <i> tags is the most convenient option. For Hugo/MkDocs with plugin ecosystems, shortcodes are more elegant.
Cross-platform publishing:If the same Markdown file needs to work across multiple platforms, emoji and Unicode symbols are the safest bet. Font Awesome and SVG methods may need adjustments on some platforms.
Internal docs / wiki:GitLab Wiki, Confluence, and similar platforms generally support HTML, so Font Awesome works. But try emoji first — if it's sufficient, there's no need to overcomplicate things.
FAQ
Why don't Font Awesome icons show up in my GitHub README?
This is the most common issue. GitHub doesn't allow external CSS or JavaScript to run for security reasons. The <i class="fa-solid fa-user"> tag isn't removed, but the corresponding icon styles never load. Use SVG image references or emoji instead.
Why do icons look different across platforms?
Icon rendering depends on each platform's HTML allowlist policy and CSS loading permissions. GitHub strips most HTML attributes, while GitLab and self-hosted sites are more permissive. That's why cross-platform documents should use emoji — it doesn't depend on external resources.
Can I customize icon color and size in Markdown?
Emoji and Unicode symbols follow text styling and can't be individually controlled. Font Awesome icons can be adjusted through CSS classes (like fa-lg, fa-2x) and color styles, but only on platforms that support custom CSS. SVG images can be sized through width/height attributes.
References
- Font Awesome Official Documentation — Official docs for the Font Awesome icon library with complete icon catalog and usage guides
- GitHub Flavored Markdown Spec — GitHub's official Markdown documentation including HTML allowlist policies
- Python-Markdown Extensions — Official documentation for Python Markdown extensions
- Font Awesome Markdown Extension — Project documentation for the fontawesome-markdown extension
- shields.io — Open-source badge generation service widely used for GitHub project status display