Skip to content
On this page

Markdown

Markdown is a lightweight markup language used to format and structure plain text. It was created by John Gruber and Aaron Swartz in 2004 as a way to write content for the web in a simple and easy-to-read way. Markdown is often used for writing documents, creating web pages, or formatting text in online forums.

Markdown uses a simple syntax to indicate formatting and structure, such as asterisks or underscores to indicate emphasis or bold text, hashtags to create headings, and hyphens or plus signs to create lists. Markdown can also include links, images, and code blocks.

One of the main advantages of Markdown is that it is easy to learn and use, even for people without technical or programming experience. It is also platform-independent, meaning that Markdown files can be easily converted into HTML or other formats, and can be used with a variety of text editors and other software tools.

Markdown Basics

Plain text: Markdown is designed to be written in plain text, which means you don't need any special software or formatting tools to create and read Markdown documents. All you need is a simple text editor, such as Notepad or TextEdit.

Syntax: Markdown uses a simple and intuitive syntax to indicate formatting and structure. For example, you can use an asterisk or underscore to indicate emphasis, and a hashtag to create headings.

**Bold text**
*Italic text*

Headings: Markdown allows you to create headings of different levels by using one or more hashtags (#) before the text. The number of hashtags used determines the level of the heading.

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

Lists: Markdown supports both ordered and unordered lists. You can create an ordered list by using numbers, and an unordered list by using hyphens or asterisks.

- Item 1
- Item 2
- Item 3

1. First item
2. Second item
3. Third item

Links: Markdown allows you to create hyperlinks to other web pages or documents by using square brackets around the link text, followed by the URL in parentheses.

[Link text](https://www.example.com)

Images: Markdown also supports the insertion of images by using an exclamation mark followed by square brackets, with the image URL in parentheses.

![Alt text](image-url.png)

Code: You can format code snippets or blocks of code in Markdown by enclosing them in backticks (`) or by indenting them with four spaces.

```python
def greet(name):
    print("Hello, " + name + "!")