Give me a guide to markdown.
- User
Give me a guide to markdown.
- Assistant
Markdown Guide
Markdown is a lightweight markup language that allows you to create formatted text using a plain-text editor. It's widely used for documentation, blogging, and formatting readme files in software projects. This guide will walk you through the basics of Markdown and some advanced features to help you create well-structured and readable documents.
Table of Contents
Getting Started
To use Markdown, you simply write using the plain-text formatting syntax and then convert it to HTML. Many platforms support Markdown, including GitHub, Reddit, and various blogging platforms.
Example:
# My Document This is a paragraph in my document.This will render as:
My Document
This is a paragraph in my document.
Basic Syntax
Headings
Use the
#symbol followed by a space and the heading text. The number of#symbols indicates the heading level (1-6).# Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 ##### Heading 5 ###### Heading 6Emphasis
You can add italic or bold emphasis to text.
*Italic text* _Italic text_ **Bold text** __Bold text__ **You can also combine _italic_ and bold**Lists
Unordered Lists
Use
-,*, or+followed by a space.- Item 1 - Item 2 - Subitem 2.1 - Subitem 2.2 * Item 3Ordered Lists
Use numbers followed by a period.
1. First item 2. Second item 1. Subitem 2.1 2. Subitem 2.2 3. Third itemLinks
Create hyperlinks using
[link text](URL).[OpenAI](https://www.openai.com)Images
Add images with
.Blockquotes
Use
>before the text.> This is a blockquote. > > It can span multiple paragraphs.Inline Code & Code Blocks
Inline Code
Use backticks
`to denote inline code.Use the `printf()` function to output text.Code Blocks
Use triple backticks ``` or indent with four spaces for code blocks. You can specify the language for syntax highlighting.
Horizontal Lines
Create horizontal lines using three or more
-,*, or_.--- * * * ___
Advanced Syntax
Tables
Create tables using pipes
|and hyphens-. Align text by adding colons:.| Header 1 | Header 2 | Header 3 | |----------|:--------:|---------:| | Row 1 | Centered | Right | | Row 2 | Text | Text |This renders as:
Header 1 Header 2 Header 3 Row 1 Centered Right Row 2 Text Text Task Lists
Create task lists using
- [ ]for incomplete tasks and- [x]for completed tasks.- [x] Write documentation - [ ] Implement feature - [ ] Review codeStrikethrough
Use
~~to strikethrough text.~~This text is crossed out.~~
Tips and Best Practices
- Consistent Formatting: Stick to either spaces or tabs for indentation. Mixing them can lead to rendering issues.
- Use Meaningful Headings: Organize your document with clear and descriptive headings.
- Limit Line Length: Keeping lines around 80 characters improves readability in plain-text editors.
- Preview Your Markdown: Use a Markdown preview tool or editor to see how your formatted text will appear.
- Learn Extended Syntax: Different platforms may support additional Markdown features like footnotes or custom containers.
Resources
With this guide, you should be able to start using Markdown effectively for your documentation, writing, and more. Happy writing!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.