Markdown Formatting Examples

Markdown Formatting Examples

This document demonstrates all the different markdown formatting options available.

Headers

H1 Header

H2 Header

H3 Header

H4 Header

H5 Header
H6 Header

Text Formatting

Bold text Italic text Bold and italic text Strikethrough text Inline code Highlighted text Subscript text Superscript text

Lists

Unordered Lists

  • Item 1
  • Item 2
    • Nested item 2.1
    • Nested item 2.2
  • Item 3

Ordered Lists

  1. First item
  2. Second item
    1. Nested item 2.1
    2. Nested item 2.2
  3. Third item

Task Lists

  • Completed task
  • Incomplete task
  • Another completed task

External link Internal link Link with title

Images

Alt text for image Local image

Code Blocks

JavaScript Example

function greetUser(name) {
  console.log(`You're awesome!, ${name}!`);
}

greetUser('World');

Python Example

def fibonacci(n):
    if n <= 1:
        return n
    return fibonacci(n-1) + fibonacci(n-2)

print(fibonacci(10))

Inline Code

Use the console.log() function to output text to the browser console.

Blockquotes

This is a blockquote

It can span multiple lines

And contain nested blockquotes

Tables

Header 1Header 2Header 3
Row 1, Col 1Row 1, Col 2Row 1, Col 3
Row 2, Col 1Row 2, Col 2Row 2, Col 3
Row 3, Col 1Row 3, Col 2Row 3, Col 3

Table with Alignment

Left AlignedCenter AlignedRight Aligned
LeftCenterRight
TextTextText

Horizontal Rules




Footnotes

Here’s a sentence with a footnote1.

Definition Lists

Term 1 : Definition for term 1

Term 2 : Definition for term 2 : Additional definition for term 2

Abbreviations

*[HTML]: HyperText Markup Language *[CSS]: Cascading Style Sheets

HTML is a markup language used for creating web pages.

Math Expressions (if supported)

Inline math: $E = mc^2$

Block math: $$ \frac{d}{dx}\int_a^x f(t)dt = f(x) $$

HTML in Markdown

This is HTML content embedded in markdown.

Escaping Special Characters

Use backslashes to escape special markdown characters:

* Not italic * ` Not code ` # Not a header


End of markdown formatting examples

Why Proper Markdown Formatting Matters

Proper markdown formatting is crucial for creating professional, accessible, and maintainable content. Here’s why it matters:

🎨 Visual Hierarchy & Readability

Well-formatted markdown creates a clear visual structure that guides readers through your content. Proper headers, lists, and emphasis make information scannable and digestible.

Accessibility

Semantic markdown elements (like proper headers and lists) improve screen reader compatibility, making your content accessible to users with disabilities.

🔧 Maintainability

Clean, consistent formatting makes content easier to edit, update, and collaborate on. Poor formatting leads to technical debt and confusion.

📱 Responsive Design

Modern markdown renderers automatically adapt formatted content for different screen sizes and devices, ensuring optimal reading experiences everywhere.

🚀 Performance & SEO

Properly structured content loads faster and performs better for search engines, improving discoverability and user experience.

Remember: Good formatting isn’t just about appearance—it’s about creating better experiences for your readers and maintainers.

Footnotes

  1. This is the footnote content.