Skip to content

Instantly share code, notes, and snippets.

@exoad
Last active August 5, 2023 22:30
Show Gist options
  • Save exoad/e4768767dbf334f5995be7bef162292f to your computer and use it in GitHub Desktop.
Save exoad/e4768767dbf334f5995be7bef162292f to your computer and use it in GitHub Desktop.
GitHub Markdown quirks

GitHub Markdown Quirks

Here are some general quirks you can use to prettify your markdowns on GitHub further!

Dropdowns

Code

<details>
  <summary>
    Dropdown
  </summary>
    Content
</details>

Result

Dropdown Content

Alignment tag

Code

<div align="left">
  <p>left</p>
</div>

<div align="center">
  <p>center</p>
</div>

<div align="right">
  <p>right</p>
</div>

Result

left

center

right

Insert Line

Code

<hr />

Result


Remove line under headers

Code

<div id="user-content-toc">
  <ul>
    <summary>
      <h1 style="display: inline-block;">
        H1
      </h1>
      <h2 style="display: inline-block;">
        H2
      </h2>
    </summary>
  </ul>
</div>

Result

    H1

    H2

Note, Warning, Important labelling

Code

> [!NOTE]
> Note

> [!IMPORTANT]
> Important

> [!WARNING]
> Warning

Result

Note

Note

Important

Important

Warning

Warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment