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

StyleIn-Cell Markdown SyntaxRendered ExampleTypical Use Case
Bold Text**Important**ImportantPrimary metrics, package names
Italic Text*Optional*OptionalSecondary notes, parameter types
Strikethrough~~Deprecated~~DeprecatedDecommissioned flags, migration tables
Inline Code`npm install`npm installCLI commands, variable names
Custom Color<span style="color:red">Failed</span>FailedStatus indicators, audit reports
Sub / SuperH<sub>2</sub>O or x<sup>2</sup>H2O or x2Chemical formulas, mathematical exponents
Font Size (Small)<small>Fine print</small>Fine printDisclaimers, table metadata, compact data
1

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:

API Deprecation & Migration Table
| 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
EndpointStatusReplacementDeprecation Notice
GET /v1/usersDeprecatedGET /v2/usersRemoved in release v3.0
POST /v1/authActiveMaintained indefinitely
DELETE /v1/cacheDeprecatedPOST /v2/flushBreaking: Requires admin token
2

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!

3

Subscripts, Superscripts & Footnote Citations

In scientific benchmarks, chemical analysis, and legal pricing tables, data frequently requires chemical formulas, polynomial degrees, or footnote disclaimers:

Scientific Chemical Analysis Table
| 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.
4

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:

Using <small> for Fine Print & Metadata
| 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

❌ Broken (Crossing Cell Borders)| Feature | Tier | | :--- | :--- | | **Enterprise | All Features** |Result: The pipe character "|" terminates cell parsing; the bold token fails to close and renders as literal asterisks!
✅ Fixed (Closed Inside Cell)| Feature | Tier | | :--- | :--- | | **Enterprise** | **All Features** |Result: Both cells close their respective tokens cleanly within their cell boundaries.

Pitfall 2: Unescaped Pipe Inside an Inline Code Span

❌ Broken (In strict parsers)| Flag | Command | | :--- | :------ | | Pipe | `grep -E "a|b"` |Result: In some parsers, the raw pipe inside backticks is parsed as a column divider before code spans are evaluated!
✅ Fixed (HTML <code> or Escaped)| Flag | Command | | :--- | :------ | | Pipe | <code>grep -E "a&#124;b"</code> |Result: Completely avoids parser confusion across 100% of Markdown engines.

Platform Compatibility Matrix

EnvironmentSupport LevelNotes & Capabilities
GitHub (GFM)Full SupportSupports bold, italic, strikethrough, inline code, <span style="color">, sub/sup, and footnotes.
GitLab (GLFM)Full SupportIdentical to GFM; supports color spans and math subscripts.
ObsidianFull SupportNative support for ==highlight==, bold, italic, strikethrough, and footnotes inside table cells.
NotionRich Text UIMarkdown import converts bold/italic; color is applied via Notion native block formatting.
PandocFull SupportTranslates inline formatting to LaTeX \textbf{}, \textit{}, and color packages.
VS CodeFull SupportBuilt-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

Format Tables Visually with One Click

Use our visual table generator to apply bold headers, alignment, and inline formatting without manual code editing.

Open Table Generator