The Only Markdown Cheatsheet You Will Ever Need
You must have found yourself in a situation where you needed to write something using Markdown.
Wait, so what is Markdown anyway? It looks like plain text and kinda feels like HTML, but it’s neither of those things?
Don’t worry, I was a bit confused the first time I had to use Markdown. But after a short time, I got used to it and realized it was really cool. By the end of the article, you will know everything there is to know in order to be able to use Markdown on a daily basis.
Photo by Bernard Hermant on Unsplash
OK, tell me again, what is Markdown and where will I use it anyway?
Markdown is a lightweight markup language that you can use to format plain text documents.
You probably know that every repository on GitHub has its own README file that explains the very purpose of the repository. Every project needs good documentation. Documentation for GitHub is written using Markdown. That is exactly why it’s necessary to handle some basics well. The second reason is that you are most likely to attract new connections and improve your networking by having an attractive profile README.
That’s it! Enough theory for today. The pure practical part goes on.
There are a lot of elements you can write in Markdown, so let’s dive into it.
PS. Please note that GitHub Markdown still needs to support some of the features below. Perhaps in the future, they might include it. Here you can find the GitHub link of the repo where I wrote detailed docs specifically for GitHub Markdown.
By writing the regular text, you are basically writing a paragraph.
There are 6 heading variants. The number of “#“ symbols, followed by text, indicates the importance of the heading.
Modifying text is so neat and easy. You can make your text bold, italic, strikethrough, highlighted, subscript, or superscript.
Want to emphasize the importance of the text? Say no more.
If you are using GitHub, the best way is to simply drag & drop the image from your computer directly to README file. You can also create a reference to the image and assign it that way. Here is the syntax.
Similar to images, links can also be inserted directly or by creating a reference. You can create both inline and block links.
You can create both inline and full-block code snippets. You can also define the programming language you were using in your snippet. All by using backticks.
As you can do in HTML, Markdown allows the creation of both ordered and unordered lists.
You can also mix both lists and create sublists.
PS. Try not to create lists deeper than two levels. It’s the best practice.
It’s also possible to create definition lists (term — definition), something you may not use often, but there is a possibility.
Great way to display well-arranged data. Use “|“ symbol to separate columns and “:“ symbol to align row content.
You can also create a “messy“ table by excluding outer “|“ symbols and not making your code well structured. Of course, it will still work, but hey → we should always arrange small things in the right way.
Keeping track of the tasks that are done and those that need to be done.
Want to describe something at the end of the file? Use footnote!
You can give ID to a heading to jump straight to that part of the file from wherever you are.
You can use asterisks, hyphens or underlines (*, -, _) to create a horizontal line. The only rule is that you must include at least three chars of the symbol.
You can also use raw HTML in your Markdown file. Most of the time that will work well, but sometimes you can experience some differences that you are not used to when working with standard HTML. Using CSS will not work.
Thank you for reading! I showed you everything there is to offer about using Markdown.
I have created a GitHub repo where you can view docs specifically for GitHub Markdown. Feel free to use it and consider supporting me by giving it a star if you like it!
Also, take a look at my GitHub README file that I created using Markdown.
You can also find some great Markdown docs here.
Let’s connect! 📲