Markdown documentation: GitHub Flavored Markdown. Github users: inline styles do not work on github and are not included as extended features of Github Flavored Markdown. This is all github supports as of Jan 2017.There are many online markdown testers that say they comply with GFM and show things like inline styles working, but github markdown pretty much. doesn't support HTML/CSS at the moment.
This is intended as a quick reference and showcase. For more complete info, see John Gruber's original spec and the Github-flavored Markdown info page.
This cheatsheet is specifically Markdown Here's version of Github-flavored Markdown. This differs slightly in styling and syntax from what Github uses, so what you see below might vary a little from what you get in a Markdown Here email, but it should be pretty close.
Table of Contents
Code and Syntax Highlighting
Github Markdown Language Support Tool
Alternatively, for H1 and H2, an underline-ish style:
Emphasis, aka italics, with asterisks or underscores.
Strong emphasis, aka bold, with asterisks or underscores.
Combined emphasis with asterisks and underscores.## Lists
- First ordered list item
- Another item
- Unordered sub-list.
Actual numbers don't matter, just that it's a number
And another item.
Some text that should be aligned with the above item.
- Unordered list can use asterisks
- Or minuses
- Or pluses
There are two ways to create links.
Or leave it empty and use the link text itself
Some text to show that the reference links can follow later.## Images
Here's our logo (hover to see the title text):
Github Markdown Language Support
Reference-style:## Code and Syntax Highlighting
Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and Markdown Here -- support syntax highlighting. Markdown Here supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the highlight.js demo page.
back-ticks around it.
Blocks of code are either fenced by lines with three back-ticks
```, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.
(Github Wiki pages don't seem to support syntax highlighting, so the above won't be colourful (the strings are not red, for example). Try it out in a Markdown Here email or a Github Markdown README or Github Issue -- you can preview a new Issue without submitting it.)
Again, to see what languages are available for highlighting, and how to write those language names, see the highlight.js demo page. Uniden cordless phone batteries.## Blockquotes
Blockquotes are very handy in email to emulate reply text.This line is part of the same quote.
This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can putMarkdown into a blockquote.## Inline HTML
You can also use raw HTML in your Markdown, and it'll mostly work pretty well. Here are a couple of common examples:
- Definition list
- Is something people use sometimes.
- Markdown in HTML
- Does *not* work **very** well. Use HTML tags.
Three or more..
Underscores## Line Breaks
My basic recommendation for learning how line breaks work is to experiment and discover -- hit <Enter> once, then hit it twice, see what happens. You'll soon learn to get what you want. 'Markdown Toggle' is your friend.
Here are some things to try out:
With only a single newline, this line andthis line will be a single line.
But this one is separated by two newlines and so will be a separate paragraph.
This line has two spaces at the end (hard for you to see, but trust me!).
So this is a separate line in the same paragraph.
Welcome to the Markdown Community Page
a text-to-HTML conversion tool for web writers. Markdown allows you towrite using an easy-to-read, easy-to-write plain text format, thenconvert it to structurally valid XHTML (or HTML).
Github Markdown Language Support Tools
This page is maintained by and for the markdown community to document varioustools and resources available to document authors and developers, as well asimplementors of the various markdown implementations.
Whether you're building a web site, a text editor, or something else, if yourproject needs to process markdown documents, you'll need to chose animplementation of a parser library. While the language your project iscoded in will likely have the largest impact on which implementation youchose, there are a number of other factors to consider. Is performancea high priority? Perhaps bindings to a C library will suit you best.Will untrusted users be able to post documents to your web site? Be sureyou are sanitizing the HTML to avoid XSS attacks and the like. Do youwant to offer support for a superset of Markdown's syntax? Will yoube writting your own superset? Some implementations come as/is, whileothers have varying degrees of customizability. Will your project have aninternational audience? Perhaps an implementation that supports Unicodeinput and/or right-to-left text is right for you.
Github Markdown Language Support Center
If you would like to develop your own implementation of the parser, you maywant to take a look at the rather lengthy list of existing implementationsalready out there (if your implementation is missing from the list, please add it).Obviously, not every one of those implementations parses markdown text in exactlythe same way. As this fragmentation of Markdown can cause frustration to thedocument author, it is important to be aware of the existing implementationsand how they behave. The very useful tool, Babelmark 2, has been providedby John MacFarlane to compare the output of various implementations. See John'sFAQ to add your implementation. The FAQ also discusses why this all mattersand provides examples of some common edge cases that various implementationsdisagree on.