How to write in Markdown
FeaturedHtml|

Ayush

Arya

|

Mar 19, 24

How to write in Markdown

Getting Started with Markdown: A Beginner’s Guide

In today’s digital age, effective communication is key, and that includes the ability to format text quickly and easily for various platforms. Markdown is a lightweight markup language that allows you to format text using simple syntax. In this beginner’s guide, we’ll explore the basics of Markdown and how you can use it to enhance your writing.

What is Markdown?

Markdown is a plain text formatting syntax that allows writers to easily format documents without the need for complex HTML or other markup languages. It was created by John Gruber and Aaron Swartz in 2004 with the goal of enabling people to write using an easy-to-read and easy-to-write plain text format that could be converted into HTML.

Why Use Markdown?

Markdown offers several advantages over traditional word processing formats:

1. Simplicity : Markdown syntax is straightforward and easy to learn, making it accessible to beginners.

2. Portability : Since Markdown is plain text, files can be opened and edited with any text editor, and they can be easily converted to other formats like HTML or PDF.

3. Compatibility : Markdown is supported by many platforms and applications, including popular content management systems like WordPress and GitHub.

4. Speed : With its lightweight syntax, Markdown allows you to format text quickly, which can be especially useful for writing on the web or in plain text editors.

Basic Syntax

Let’s dive into some of the basic syntax you’ll need to know:

 Headings

# Heading 1
## Heading 2
### Heading 3

Emphasis

*italic*
**bold**

Lists

- Item 1
- Item 2
  - Subitem
[Link Text](http://example.com)

Images

![Alt Text](http://example.com/image.jpg)

Code

`inline code`

```
code block
```

Advanced Formatting

Markdown also supports more advanced formatting options, such as tables, blockquotes, and inline HTML.

Tables

| Header 1 | Header 2 |
| -------- | -------- |
| Cell 1   | Cell 2   |

Blockquotes

> This is a blockquote.

Inline HTML

<span style="color: blue;">Inline HTML</span>

Horizontal Rules

---

Escaping Characters

\*literal asterisks\*

Additional Features

Markdown Strikethrough

you can create strikethrough text by enclosing the text you want to strike through with two tilde (~) symbols on each side. Here’s how to do it:

~~strikethrough text~~

For example, if you want to display “This is a strikethrough text” with a strikethrough effect, you would write:

~~This is a strikethrough text~~

When rendered, the text will appear as: This is a strikethrough text

You can use this syntax to add strikethrough formatting to any text within your documents.

Markdown Image size

you can’t directly resize images using Markdown syntax alone. However, you can achieve image resizing by using HTML within Markdown, if your Markdown renderer supports it.

Here’s how you can do it:

<img src="http://example.com/image.jpg" alt="Alt text" width="200" height="100">

Replace "http://example.com/image.jpg" with the URL of your image, "Alt text" with the alternative text for the image, and adjust the width and height attributes to your desired dimensions.

Keep in mind that not all Markdown renderers may support HTML, and even if they do, some platforms might restrict the use of HTML for security reasons. Therefore, it’s always a good idea to check the documentation of your Markdown renderer or the platform where you’re publishing your content to ensure HTML usage is allowed and supported.

Markdown Table

you can create tables using a simple syntax. Here’s a basic guide on how to create tables:

Basic Table Syntax:

To create a table , you use pipe | characters to separate columns, and hyphens - to create a header row. Here’s the basic structure:

| Header 1 | Header 2 | Header 3 |
| -------- | -------- | -------- |
| Row 1, Column 1 | Row 1, Column 2 | Row 1, Column 3 |
| Row 2, Column 1 | Row 2, Column 2 | Row 2, Column 3 |

Example:

Let’s create a simple table with two columns:

| Fruit    | Quantity |
|----------|----------|
| Apple    | 3        |
| Orange   | 5        |
| Banana   | 2        |

This code will generate the following table:

FruitQuantity
Apple3
Orange5
Banana2

Notes:

  • Ensure that each column’s content lines up with its corresponding header.
  • You can add as many rows as needed, just separate them with a new line.
  • The number of hyphens in the header row doesn’t need to match the number of pipes, but it’s a good practice for readability.

Advanced Table Features:

Markdown also supports more advanced table features like alignment and spanning cells, although these features are not universally supported across all Markdown renderers. Here’s an example of how to align columns:

| Left-aligned | Center-aligned | Right-aligned |
|:-------------|:--------------:|--------------:|
| Left         | Center         | Right         |

This Markdown code will generate a table with aligned columns:

Left-alignedCenter-alignedRight-aligned
LeftCenterRight

Markdown checkbox

you can create checkboxes using a combination of square brackets [] and square brackets with an ‘x’ inside [x]. Here’s how you can do it:

  • [ ] represents an unchecked checkbox.
  • [x] represents a checked checkbox.

Here’s an example of how you can create a list with checkboxes:

- [ ] Task 1
- [x] Task 2
- [ ] Task 3

This Markdown code will generate a list with checkboxes:

  • [ ] Task 1
  • [x] Task 2
  • [ ] Task 3

You can use this syntax to create to-do lists, checklists, or any other list where you need checkboxes to indicate completion status.

Explore Markdown tools for enhanced writing experience

Markdown Cheat Sheet

Here’s a quick cheat sheet summarizing the basic syntax:

  • Headings : `#`, `##`, `###`, etc.
  • Emphasis : `*italic*`, `**bold**`
  • Lists : `-` for unordered lists, `1.`, `2.`, etc. for ordered lists
  • Links : `[Link Text](http://example.com)`
  • Images : `![Alt Text](http://example.com/image.jpg)`
  • Code : “ `inline code` “, triple backticks for code blocks
  • Tables : `| Header 1 | Header 2 |`

Conclusion

Markdown is a versatile and efficient markup language that simplifies the process of formatting text for various purposes. With its straightforward syntax and wide adoption, Markdown has become an indispensable tool for writers, bloggers, developers, and anyone else who needs to format text quickly and effectively.

By mastering Markdown and incorporating it into your writing workflow, you can save time, improve readability, and enhance the overall presentation of your content. So go ahead, explore the advanced features, experiment with different syntax options, and unleash the full potential of Markdown in your writing endeavors.


Popular Blog Categories


Contact Me

Phone

Discuss A Project Or Just Want To Say Hi?
My Inbox Is Open For All.

Mail : techayu001@gmail.com

Chatbot