
A Guide to Editing .md Files

2 min read (4 min read total)
Markdown (.md) is a lightweight markup language with plain text formatting syntax. It’s designed to be easily readable and writable by humans, then converted into structurally valid HTML. Whether you’re writing documentation, a blog post, or notes, mastering the core elements of Markdown editing will significantly streamline your workflow.
Basic Text Formatting
Markdown uses simple characters to apply styles to text.
- Bold: To make text bold, wrap it in double asterisks or double underscores:
**bold text**
or__bold text__
.
- Italics: To make text italic, wrap it in single asterisks or single underscores:
*italic text*
or_italic text_
. - Strikethrough: To apply strikethrough, which visually crosses out text, wrap it in double tildes:
~~strikethrough text~~
.
Markdown Syntax | Output |
---|---|
**Bold Text** | Bold Text |
_Italics Text_ | Italics Text |
~~Strikethrough Text~~ |
Understanding Heading Levels
Headings are crucial for structuring your document and improving readability. Markdown uses the hash symbol (#
) to denote headings. The number of hash symbols determines the heading level, from H1 (largest and most important) down to H6 (smallest).
H1 - The Main Title
Use a single hash symbol for the main title of your document. There should typically only be one H1 per file.
# This is an H1 Heading
H2 - Major Sections
Use two hash symbols for the main sections of your article.
## This is an H2 Heading
H3 and Below - Subsections
Continue adding hash symbols for deeper levels of organization. Markdown supports up to H6.
### This is an H3 Heading
#### This is an H4 Heading
Tip: Always place a space between the hash symbols and the heading text for correct rendering.
Lists and Links
Creating Lists
Lists help organize information clearly. Markdown supports both ordered and unordered lists.
-
Unordered Lists: Use an asterisk (
*
), a plus sign (+
), or a hyphen (-
) followed by a space.* Item One
* Item Two
* Nested Item
-
Ordered Lists: Use a number followed by a period (
.
) and a space. The specific number doesn’t matter; Markdown will automatically increment the list (though starting at1.
is a common convention).1. First Step
2. Second Step
3. Third Step
Inserting Links
To create a hyperlink, wrap the link text in square brackets ([]
) and the URL in parentheses (()
) immediately following it.
[Google Homepage](https://www.google.com)
Quoting and Code
Blockquotes
To indicate a passage of text as a blockquote (often used for quotes or emphasized text), use the greater than sign (>
) at the beginning of the line.
> This is text that is quoted.
> It can span multiple lines.
Inline Code and Code Blocks
Markdown is frequently used for technical documentation, so it has excellent support for displaying code.
-
Inline Code: Use single backticks (
`
) to highlight a short piece of code or a command within a paragraph.Use the \
print()` function to display output.` -
Code Blocks: For larger blocks of code, use **triple backticks (```) ** on the lines before and after the code. You can also specify the programming language immediately after the opening backticks for syntax highlighting (a feature called “fenced code blocks”).
```python
def greet():
print("Hello, Markdown!")
```
Summary of Essential Syntax
Feature | Markdown Syntax |
---|---|
Heading 1 (H1) | # Main Title |
Heading 3 (H3) | ### Subsection |
Bold | **text** |
Italics | _text_ |
~~text~~ | |
Link | [Text](URL) |
Unordered List Item | * Item |
Blockquote | > Quoted Text |
Inline Code | `code` |
By using these simple, intuitive conventions, you can create clean, well-structured, and easily portable documents. Happy editing!