keepcalculator

06 Numbers and Powers

Why Markdown Looks Different When It Renders

Card No. 06·24542 · Updated · Standard formula, shown below

Markdown can render differently from what you see in an editor because the plain-text source is only a set of formatting instructions, and the application that displays it decides how to interpret and style those instructions. Different Markdown flavors, rendering settings, themes, and surrounding page styles can therefore produce different results from the same text.

Markdown separates source from presentation

Markdown is a lightweight way to mark up text using ordinary characters. A pair of asterisks can indicate emphasis, a leading hash can indicate a heading, and a hyphen can begin a list item. The source remains readable as text, but it is not itself the finished page.

A Markdown renderer reads the source, recognizes supported patterns, and converts them into a presentation format—often HTML. A browser then displays that output according to styles such as fonts, spacing, colors, and layout. In a typical pipeline, the result depends on both the Markdown parser and the CSS or theme used to display its output.

This is why “what I typed” and “what I see” are not always the same thing. An editor may show the original characters, a live preview, or a mixture of source and formatted text. Each view has a different purpose.

What happens when Markdown is rendered

A renderer generally processes Markdown in stages. It identifies block-level structures, such as paragraphs, headings, lists, and code blocks, then handles inline structures such as links, emphasis, and code spans. The output is then styled by the application or website.

For example, this source:

## Notes

Read the **latest guide**.

- Check the link
- Review the example

might become an HTML heading, a paragraph with bold text, and a two-item list. The browser does not normally display the Markdown markers as visible characters; it displays the structures they describe. A preview may also apply margins, font sizes, or list indentation that are absent from the source itself.

Some editors use “syntax highlighting” to color Markdown markers without rendering them. Others use a split view, with source on one side and a rendered preview on the other. In an editor that formats text in place, markers may be hidden or transformed while you type. These are interface choices, not changes to the basic idea of Markdown.

Different Markdown flavors interpret some syntax differently

Markdown has widely used conventions, but no single feature set is implemented identically by every tool. Many platforms support a common baseline and add extensions; others omit features or apply their own rules. As a result, text that works in one preview may look different—or remain plain text—in another.

  • Tables: Some renderers recognize pipe-based table syntax, while others require an extension or do not support it.
  • Task lists: A line such as - [ ] Draft the page may become a checkbox in one application and a list item with literal brackets in another.
  • Strikethrough: Double tildes are common, but support is not universal.
  • Raw HTML: Some renderers allow selected HTML in Markdown; others escape it, filter it, or disable it.
  • Newlines: A single line break in the source may be treated as a space, a visible break, or a paragraph boundary depending on the syntax and renderer.

Even within a familiar feature, edge cases can vary. For example, a numbered list may be renumbered automatically, or a blank line may affect whether a following block belongs inside a list. If content must work across several destinations, use the features they have in common or check each destination’s Markdown documentation.

Whitespace and punctuation can change the result

Markdown uses punctuation and spacing as signals, so small source differences can matter. A heading marker generally needs to appear at the start of a line, and list markers need to be placed where the parser recognizes a list. Asterisks or underscores intended as emphasis can be interpreted differently when they touch other punctuation or are unbalanced.

Consider these two forms:

This is a paragraph.
This may still be the same paragraph in some renderers.

This starts a new paragraph.

A blank line commonly separates paragraphs. A single newline often does not create a new paragraph, though some systems offer a setting or extension for hard line breaks. Trailing spaces have historically been used for line breaks in some Markdown conventions, but they can be difficult to notice and may be removed by editors. When the distinction matters, check the target renderer’s rules and preview the result.

Code blocks are another source of surprises. Indentation or fence markers determine where code begins and ends. If a closing fence is missing, later text may all appear as code. Likewise, a fenced block labeled with a language may receive syntax coloring in one preview, while another simply shows monospaced text.

The renderer and theme affect appearance

Correctly interpreted Markdown can still look noticeably different because renderers do not dictate a single visual design. The same heading may be large and widely spaced on one site, but smaller and more compact in an editor. Themes and page styles control details such as font family, line height, colors, link appearance, code-block backgrounds, and list indentation.

Context also matters. A document preview may be displayed inside a narrow pane, while the published page uses the full browser width. Responsive layouts can wrap text differently on phones. Fonts available on one device may not exist on another, causing a substitute font to change line breaks. These differences are about presentation, not necessarily a Markdown parsing error.

There can also be an extra processing layer. A publishing system may add templates, sanitize HTML, rewrite links, or apply site-specific extensions after parsing Markdown. That means an editor’s preview is a useful approximation, but it may not reproduce every part of the final publishing environment.

How to diagnose a mismatch

When the preview does not match your expectation, identify whether the problem is interpretation or styling before changing the source. A missing table is likely a feature-support issue; a table with the expected rows but different borders is more likely a styling issue.

  1. Check which view you are using. Confirm that you are looking at rendered preview rather than source with syntax highlighting.
  2. Look up the destination’s Markdown flavor. Verify support for the feature involved, especially tables, task lists, raw HTML, and line breaks.
  3. Inspect whitespace and markers. Check blank lines, indentation, matching emphasis markers, and code-fence openings and closings.
  4. Preview in the target environment. If the content will be published on a particular service, its preview or a test page is more reliable than an unrelated editor.
  5. Separate structure from styling. If the structure is right but the appearance is not, investigate the theme, CSS, screen width, or font rather than rewriting valid Markdown.

For portable documents, simple headings, paragraphs, links, emphasis, lists, and fenced code blocks are generally safer choices than platform-specific extensions. Keep a copy of the source so it can be adjusted if a destination handles a feature differently.

Frequently Asked Questions

Why does Markdown look like plain text in my editor?
An editor may be showing the source rather than a rendered preview. Look for a preview button, split-view option, or setting that enables Markdown rendering.

Why does my Markdown preview differ from the published page?
The editor and publishing site may use different Markdown parsers, extensions, themes, or page styles. Preview in the destination environment when possible.

Why does pressing Enter not start a new line?
In many Markdown conventions, a single newline is treated as a space within the same paragraph. A blank line usually starts a new paragraph; a hard line break may require syntax supported by that renderer.

Why are my Markdown table or checkbox not working?
Tables and task-list checkboxes are extensions in many Markdown implementations, not features supported everywhere. Check whether the target renderer enables them.

Is Markdown the same as HTML?
No. Markdown is a lightweight source format that a parser can convert to HTML or another output. HTML describes document structure more directly, while Markdown offers shorter, more readable notation for common formatting.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →