Markdown lets you write structured text with plain punctuation and convert it to HTML afterwards. It is fast to write, easy to read in its raw form and portable across editors, documentation systems and publishing platforms. This guide explains the syntax that matters, what happens during conversion, how to keep the result clean and safe, and how to use it in a real publishing workflow.
The syntax you will use daily
- Headings: one to six hash signs at the start of a line (
# Title,## Section). - Emphasis: asterisks for italic and double asterisks for bold.
- Lists: a hyphen or number at the start of each line.
- Links and images:
[text](https://example.com)and. - Code: backticks for inline code and triple backticks for blocks.
- Quotes and tables: a greater-than sign for quotes and pipes for table columns, which many dialects support.
Markdown comes in dialects. CommonMark standardised the core rules, while extensions such as GitHub Flavored Markdown add tables, task lists and strikethrough. If the same text renders differently in two places, the dialect is usually the reason.
What conversion actually does
A converter reads your text line by line, recognises the patterns and writes the matching HTML elements: a hash heading becomes an h2, a blank-line-separated block becomes a paragraph, a hyphenated list becomes ul and li. It does not add styling. The output is semantic, unstyled HTML, which then inherits the look of the page it is placed in. That separation of content and design is the main benefit.
Keep the HTML clean and accessible
- Use one h1 per page and do not skip heading levels, since screen readers and search engines use the outline.
- Always write alt text for images that carry meaning.
- Use descriptive link text and avoid “click here”.
- Keep tables for data, not for layout.
Safety: never publish unsanitised HTML from strangers
Markdown allows raw HTML in many dialects. If you convert text written by other people, such as comments, forum posts or user profiles, and insert the result into a page without cleaning it, you open the door to cross-site scripting, where a malicious script runs in your visitors’ browsers. Use a converter configuration that disables raw HTML or run the output through a maintained HTML sanitiser, and strip dangerous link types such as javascript:. Text you wrote yourself is lower risk, but the habit of sanitising user-supplied content is not optional.
A real-world example: a help-centre article
A support team keeps its help articles as Markdown files in a shared folder, so that several people can edit them and track changes. One article explains how to reset a password. The writer drafts it in plain text: a title, a short intro, a numbered list of five steps, a quote-style note about the reset email expiring, a table of common error messages and what they mean, and a link to the contact page.
Before publishing she pastes the Markdown into a converter with a live preview. The preview shows that the second list has been absorbed into the first because a blank line was missing, and that the table is not rendered because the header separator row was malformed. She fixes both in the source, copies the clean HTML into the help-centre template, and the site’s own styles take over. Because the article is her team’s own content, she does not need to sanitise it beyond the standard review, but the same pipeline for customer-submitted text would include a sanitiser. The result is consistent articles that look identical, are easy to update and keep a readable source of truth.
A simple publishing workflow
- Write in Markdown in any editor.
- Preview the conversion and fix structure problems in the source.
- Convert to HTML and paste into your template or build system.
- Check headings, links and image alt text.
- Publish, and keep the Markdown as the master copy.