Skip to content
TheChatArchiveThe Chat Archive
o1-mini-2024-09-12· OpenAIAi2 WildChat-4.8M (AI2)

Give me a guide to markdown.

  1. User

    Give me a guide to markdown.

  2. 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

    1. Getting Started
    2. Basic Syntax
    3. Advanced Syntax
    4. Tips and Best Practices
    5. Resources

    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 6
    

    Emphasis

    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 3
    

    Ordered Lists

    Use numbers followed by a period.

    1. First item
    2. Second item
       1. Subitem 2.1
       2. Subitem 2.2
    3. Third item
    

    Links

    Create hyperlinks using [link text](URL).

    [OpenAI](https://www.openai.com)
    

    Images

    Add images with ![alt text](image URL).

    ![Markdown Logo](https://markdown-here.com/img/icon256.png)
    

    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 1Header 2Header 3
    Row 1CenteredRight
    Row 2TextText

    Task Lists

    Create task lists using - [ ] for incomplete tasks and - [x] for completed tasks.

    - [x] Write documentation
    - [ ] Implement feature
    - [ ] Review code
    

    Strikethrough

    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!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.