Text Formatting & Colors in Markdown Tables
Formatting text inside Markdown table cells allows you to highlight key metrics, visually strike out deprecated API endpoints, distinguish code identifiers, and add custom status colors. Because Markdown table cells evaluate inline formatting rules between cell pipes, you can combine standard Markdown syntax with HTML tags for maximum visual clarity.
Quick Reference: In-Cell Text Formatting
| Style | In-Cell Markdown Syntax | Rendered Example | Typical Use Case |
|---|---|---|---|
| Bold Text | **Important** | Important | Primary metrics, package names |
| Italic Text | *Optional* | Optional | Secondary notes, parameter types |
| Strikethrough | ~~Deprecated~~ | Deprecated | Decommissioned flags, migration tables |
| Inline Code | `npm install` | npm install | CLI commands, variable names |
| Custom Color | <span style="color:red">Failed</span> | Failed | Status indicators, audit reports |
| Sub / Super | H<sub>2</sub>O or x<sup>2</sup> | H2O or x2 | Chemical formulas, mathematical exponents |
| Font Size (Small) | <small>Fine print</small> | Fine print | Disclaimers, table metadata, compact data |
Standard In-Cell Formatting: Bold, Italic & Strikethrough
All standard Markdown inline text styles work directly between cell pipes. Because tables are row-oriented, make sure every opening token (such as ** or ~~) has its closing pair inside the same cell:
| Endpoint | Status | Replacement | Deprecation Notice | | :------- | :----: | :---------- | :----------------- | | `GET /v1/users` | ~~Deprecated~~ | `GET /v2/users` | *Removed in release v3.0* | | `POST /v1/auth` | **Active** | — | Maintained indefinitely | | `DELETE /v1/cache`| ~~Deprecated~~| `POST /v2/flush` | ***Breaking:*** Requires admin token |Rendered Browser Simulation
| Endpoint | Status | Replacement | Deprecation Notice |
|---|---|---|---|
| GET /v1/users | Deprecated | GET /v2/users | Removed in release v3.0 |
| POST /v1/auth | Active | — | Maintained indefinitely |
| DELETE /v1/cache | Deprecated | POST /v2/flush | Breaking: Requires admin token |
Custom Text Colors in Table Cells
Standard Markdown has no syntax for colors. However, GitHub, GitLab, and most static site generators allow inline HTML <span style="color: ..."> or <font color="..."> tags. This is widely used in status matrices, SLA tables, and security audit reports:
| Service Name | Health Check | Latency | SLA Guarantee | | :----------- | :----------: | :-----: | :------------ | | Auth Gateway | <span style="color:#10b981">● Operational</span> | 18 ms | <span style="color:#10b981">99.99%</span> | | Payment API | <span style="color:#f59e0b">▲ Degraded</span> | 420 ms | <span style="color:#f59e0b">99.50%</span> | | Search Index | <span style="color:#ef4444">✖ Outage</span> | — | <span style="color:#ef4444">Breached</span> |
💡 Theme Tip: When choosing hex colors (like #10b981 or #ef4444), test that your colors are legible in both light and dark mode backgrounds!
Subscripts, Superscripts & Footnote Citations
In scientific benchmarks, chemical analysis, and legal pricing tables, data frequently requires chemical formulas, polynomial degrees, or footnote disclaimers:
| Compound | Formula | Concentration | Molecular Weight | Reference | | :------- | :-----: | :------------ | :--------------- | :-------: | | Water | H<sub>2</sub>O | 99.4% | 18.015 g/mol | [^1] | | Carbon Dioxide | CO<sub>2</sub> | 0.04% | 44.01 g/mol | [^2] | | Sulfate | SO<sub>4</sub><sup>2-</sup> | 0.56% | 96.06 g/mol | [^1] | [^1]: Verified via NIST Chemistry WebBook (2026). [^2]: Atmospheric baseline measurement.
Changing Font Size in Markdown Tables (<small> & CSS)
Standard Markdown has no syntax for font sizes. When formatting large tables with dozens of columns, reducing cell font size prevents horizontal scrolling and improves visual density:
| Package Name | Version | License | Disclaimers & Regulatory Notes | | :----------- | :-----: | :-----: | :----------------------------- | | core-engine | v2.4.0 | MIT | <small>*Subject to export compliance laws. Requires Node 18+.*</small> | | table-diff | v1.1.0 | Apache | <small>*Experimental beta feature. Benchmarks pending.*</small> |
💡 Table-Wide Scaling: For SSG sites (Docusaurus, VitePress, Hugo), apply CSS to scale the entire table: .markdown-table td { font-size: 0.85rem; }.
Common Pitfalls & Broken vs Fixed Examples
Pitfall 1: Unclosed Formatting Tokens Crossing Table Columns
Pitfall 2: Unescaped Pipe Inside an Inline Code Span
Platform Compatibility Matrix
| Environment | Support Level | Notes & Capabilities |
|---|---|---|
| GitHub (GFM) | Full Support | Supports bold, italic, strikethrough, inline code, <span style="color">, sub/sup, and footnotes. |
| GitLab (GLFM) | Full Support | Identical to GFM; supports color spans and math subscripts. |
| Obsidian | Full Support | Native support for ==highlight==, bold, italic, strikethrough, and footnotes inside table cells. |
| Notion | Rich Text UI | Markdown import converts bold/italic; color is applied via Notion native block formatting. |
| Pandoc | Full Support | Translates inline formatting to LaTeX \textbf{}, \textit{}, and color packages. |
| VS Code | Full Support | Built-in preview displays all standard inline Markdown and HTML color styles. |
Frequently Asked Questions
How do I change text color inside a Markdown table cell on GitHub?
Standard Markdown has no native color syntax. To color text in GitHub Markdown tables, use HTML <span style="color: #10b981">Text</span> or legacy <font color="green">Text</font>. GitHub’s sanitizer preserves inline color styles for text elements inside table cells.
Can I use bold and italic together inside the same table cell?
Yes. Wrap text in three asterisks: | ***Bold and Italic*** |. You can also nest tags: | **Bold with *italic* inside** |.
How do I display strikethrough text for deprecated features in tables?
Wrap text in double tildes: | ~~Deprecated API~~ |. This is part of standard GitHub Flavored Markdown (GFM) and renders as a line through the text, perfect for migration guides.
Can I add footnote citations ([^1]) inside Markdown table cells?
Yes. Most GFM and Pandoc processors allow footnote references inside table cells: | Product[^1] | $99 |. Place the footnote definition ([^1]: Price includes tax) on its own line after the table.
Why does my inline code backtick break my table formatting?
If your code contains a pipe character (`a | b`), some naive parsers confuse the backtick with a table delimiter. In GFM, standard backticks protect internal pipes, but you must ensure backticks are strictly closed within the cell pipes.
How do I change the font size of a Markdown table or individual cells?
Because pure Markdown lacks font size syntax, use the HTML <small> tag (<small>Text</small>) for compact text or inline CSS: <span style="font-size: 11px">Text</span>. If you maintain a documentation website (such as Docusaurus, VitePress, or MkDocs), you can style the entire table via CSS: table { font-size: 0.85rem; }.
Related Markdown Table Syntax Guides
Escape pipes inside code spans and math formulas.
Line Breaks (<br>)Combine bold text and multi-line breaks.
Merged CellsColspan and rowspan workarounds in tables.
Format Tables Visually with One Click
Use our visual table generator to apply bold headers, alignment, and inline formatting without manual code editing.