Markdown on GitHub: All commands
With Markdown you can make simple text on GitHub appealing and meaningful in no time. Here you will find the essential markdown commands for GitHub.
Github markdown: general text commands
- Mark headings with # at the beginning of the line. The number of # indicates the rank of the heading, i.e. # for H1, ### for H3 or ###### for approximately H6.
- Note that H1 is the highest rank and higher numbers descend in rank. Headings lower than 6 are not enough.
- You can use bold and / or italic text for emphasis.
- * Text * or _Text_ between simple * or _ becomes italic.
- ** Text ** or __Text__ between double * or _ becomes bold.
- * And you __can combine it too *
- With tildes you can also strike out text ~~ ~~.
- You can create quotes or other highlighted blocks of text by introducing the corresponding lines of text with>.
- You can set links by writing the [link text] in square brackets and immediately behind (www.denLink.de) in round brackets. So [link text] (www.denLink.de).
- Images can be embedded in a similar way. After an exclamation mark, write the picture description in square brackets and put the picture link in round brackets directly behind it:! [Test picture] (www.dieBildURL.de)
Lists and tables with github markdown
- You can create unsorted lists by starting each new point in a new line with * or -.
- If you want to insert sub-items, put two spaces before * or -.
- Numbered lists are recognized automatically. Simply start a new line with 1. In the next one, write the first 2 and so on.
- Build tables with - and |. | separates two columns from each other, with - define the header.
- For example, first write head 1 | Head 2. Then put ------ | in the second line below ------.
- This specifies the number of columns in the table and you can then fill each row with content as required. Just remember that you are using the column separator | always put between the column contents.
Github: code markdown
- You can embed code in Github in several ways.
- Place the code in single quotation marks directly in a text block to make it easy to highlight `int test = 1`.
- If you prefer to generate several lines of free-standing code, start each of these lines with four spaces.
- Since this can be annoying, especially with longer blocks of code, Github also offers the option of fencing your code. Before and after the code, write a line with three quotation marks: `` ''.
- If you also want Github to automatically recognize the syntax of your code and highlight it in color, write the name of the language in the introductory line of the "fence": `` `` javascript.
A complete student package from GitHub can be found in our download area.