Comprehensive Guide to Markdown Syntax

Introduction to Markdown Markdown is a lightweight markup language created by John Gruber in 2004. It allows users to compose documents using an easy-to-read plain text format, which can be subsequently converted into structurally valid HTML, Word, PDF, Epub, or other file types. Files authored in Markdown typically utilize the .md or .markdown file extensions.

Core Syntax Guide

Headings Headings are generated by prefixing a line with the hash symbol (#). The quantity of hashes dictates the heading level.

Level 1 Heading

Level 2 Heading

Level 3 Heading

Level 4 Heading

Level 5 Heading
Level 6 Heading

Line Breaks There are multiple approaches to enforce a line break within a paragraph:

Append two trailing spaces at the end of a line. Insert a blank line between two text blocks to create a new paragraph. Embed the HTML <br/> tag directly within the content for a forced break.

Text Emphasis You can apply italic, bold, or combined styling using asterisks or underscores. Italic textItalic textBold textBold textBold and italic textBold and italic text

Horizontal Rules To produce a thematic break, use three or more asterisks, dashes, or underscores on a standalone line.






Strikethrough and Underline Strikethrough formatting is applied using double tildes, while underlining requires standard HTML tags. Strikethrough text<u>Underlined text</u>

Lists Unordered lists can be constructed using asterisks, dashes, or plus signs as bullet markers.

  • Item A

  • Item B

  • Item C

  • Item D

  • Item E

  • Item F

Blockquotes Blockquote are designated by a greater-than sign (>) followed by a space at the beginning of a paragraph. > Basic blockquote > Continued text

Blockquotes can be nested by adding additional greater-than signs. > Outer blockquote >> Nested blockquote >>> Deeply nested blockquote

You can also embed lists inside blockquotes. > Quoted text with a list > 1. First ordered item > 2. Second ordered item >> + Nested unordered item >> + Another nested item

Inserting Code For inline code snippets, wrap the text with single backticks. int buffer[5] = {0};To display a block of code, use triple backticks before and after the code segment.

let counter = 0;
console.log(counter);

Links Hyperlinks can be constructed using bracketed text followed by parentheses containing the URL, or by simply enclosing the URL in angle brackets. Link Label<https://example.com>

Images Images follow a syntax similar to links but are prefixed with an exclamation mark. The bracketed text serves as the alternative text for the image. Alt Text

Tables Tables are formed using pipes and hyphens. Colons within the hyphen row dictate column alignment: left, right, or center.

HTML Elements Support Any markup not natively covered by Markdown can be written directly using stendard HTML. For instance, keyboard keys can be represented using the <kbd> tag. Use Ctrl+Alt+Del to restart the system. To indent the first line of a paragraph, HTML spacing entities can be utilized:

Use two &ensp; entities for a half-space indent. Use four &nbsp; entities for a standard full-space indent.

Tags: Markdown Lightweight Markup Language Plain Text Formatting HTML Conversion

Posted on Mon, 08 Jun 2026 17:32:01 +0000 by wes007