For better experience
For better experience, this file is supposed to be viewed from GitHub; although conventional .md file editors would deliver an almost identical experience .
To avoid confusion, the code, e.g., "# A first-level heading"
is supposed to be read from source code beside the rendered preview; omitting actual code from being displayed on preview view is intentional.
Headers
To create a heading, add 1 to 6 '#'
symbols before your heading text.
Styling text
Style | Shortcut | Output (Syntax in source code) |
---|---|---|
Bold | Ctrl+B | Bald text (way 1) or Bald text (way 2) |
Italic | Ctrl+I | Italic text (way 1) or Italic text (way 2) |
Strikethrough | ||
Bold and nested italic | Bald and italic text (way 1) | |
All bold and italic | Bald and italic text (way 2) | |
Subscript | Sample textsubscripted text | |
Superscript | Sample textsuperscripted text |
Quotes & Code Blocks
This is a quote
This is a code text
This is distinct block code text
The background color is #0969DA
rgb(9, 105, 218)
for light mode and #000000
for dark mode.
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
Comments
Look at source Code
<!-- This is a comment -->
[//]: # (This is a comment)
Links & Images
Relative links are better than absolute links Use relative link operands, such as ./ and ../.
#Context Relative Link
File Path | Syntax |
---|---|
Absolute | image.png |
In outer file 'outer_file' |
/outer_file/image.png |
Lists
Precede one or more lines of text with -
, *
, or +
:
- Unordered list elements 1
- Unordered list elements 2
- Unordered list elements 3
Precede each line with a number (numerical subsequence doesn't matter).
- Unordered list elements 1
- Unordered list elements 2
- Unordered list elements 4
Indent items below another item.
- First list item
- Second nested list item
- Third nested list item
- Second nested list item
To create a task list, preface list items with a hyphen and space followed by [ ]. To mark a task as complete, use [x].
- Do thing #1
- Do thing #2
- Do thing #3
Paragraphs
You can create a new paragraph by leaving a blank line between lines of text.
I need footnote #1 [^1].
I need footnote #2 [^2].
[^1]: Here is footnote #1.
[^2]: Here is footnote #2.
Creating Tables
-
Use pipes
|
and hyphens-
(at least three hyphens) to create table. -
Must include a blank line before your table for it to render correctly.
-
Cells can vary in width and do not need to be perfectly aligned within columns.
Command | Description |
---|---|
Col 1 Row 1 | Col 2 Row 1 |
Col 1 Row 2 | Col 2 Row 2 |
Align text by including colons to the left, right, or on both sides of the hyphens within the header row.
Left-aligned | Center-aligned | Right-aligned |
---|---|---|
Left-aligned text | Center-aligned text | Right-aligned text |
Title of Close-by-Default Details
#Close-by-Default Details
Title of Open-by-Default Details
#Open-by-Default Details