Markdown in 2024
When you a software developer or learning to become one you must know have come across this file on Github which ends with the extension of ".md".
If you ever wondered what it is or how do write this syntax you have to the right place.
What is Markdown?
According to wikipedia:
Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber created Markdown in 2004 as a markup language that is easy to read in its source code form.
Markdown is an easy to use language that allows basic text formatting. But still it is very powerful and can be used to design and develop static pages. You can see for yourself that some developers have a great github home page that is made with the help of Markdown. Okay, now that you understand what is markdown you must be eager to learn how to write it, so, read on!
Markdown syntax
Headings
You can add headings in your Markdown file by adding the ' # ' sign before your text followed by a space. The heading will follow the same font size as html rules meaning that single " # " sign will convert to h1 and " ###### " will convert to h6 tag.
Example:
# Header One
---->
Header One
## Header Two
---->
Header Two
###### Header Six
---->
Header Six
Paragraphs
To create paragraphs you just have to simply write without using any symbols. Just when you want a paragraph change you can leave a blank line and proceed with the next paragraph.
Whoever fights monsters should see to it that in the process
he does not become a monster. And if you gaze long enough into
an abyss, the abyss will gaze back into you.โ
โ Friedrich Nietzsche
Bold, italics and strikethrough
You can add emphasis to your text by adding " * " or " _ " and cancel any text by adding " ~ " before and after your text. For example:
** Bold **
-> Bold
_Italics_
-> Italics
~~ StrikeThrough ~~
-> StrikeThrough
Divider
You can create separating lines in your paragraphs by adding a divider using "---" followed by an empty line.
---
--->
Blockquote
To create blockquote you can add " > " before a sentence.
> And those who were seen dancing were thought to be insane by those who could not hear the music. -- Friedrich Nietzsche
This is render an output like this : --
And those who were seen dancing were thought to be insane by those who could not hear the music. -- Friedrich Neitezsche
Lists
You can also add lists to you pages single hypens " - " for unordered lists and use numbers for ordered lists like " 1. ".
- Maggie
- Chocolate
- Ice Cream
1. Apple
2. Oranges
3. Kiwi
Maggie
Chocolate
Ice Cream
Apple
Orange
Kiwi
Link
You can add link to some external sites using this format
[Site name you want to give ](Site link )
[Awesome resource](https://www.w3schools.com/)
This will result in something like this:
Image
You can also add image by using the following syntax :-
![alt Image name ](link to apple image)
This will show the image as:-
Task list
Task list has the following format:-
- [ ] Mercury
- [x] Venus
- [x] Earth
HighLight
Highlighting can be done following this syntax: -
This is all you need to do to get ==highlighted text==
This is all you need to do to get highlighted text
Emoji
Markdown also has emoji support, so you can add your favourite emojis and make your markdown files more interesting.
That is so funny! :joy:
That is so funny! ๐
Pro tip: I use google docs to see the emoji names to use.
Subscript
You can also add add subscript when you need it.
C~O~2
COโ
Superscript
X^2
X2
Conclusion
After learning all these you will be able to create beautiful Readmes in your Github and also able to understand others' github readme. If you like me to add something else that I might have missed be sure to comment it. Thank you so much. ๐
Subscribe to my newsletter
Read articles from Nirban Roy directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Nirban Roy
Nirban Roy
As a software engineer, ๐งโ๐ป I write guides ๐ on the technologies ๐ I have used to make them simpler for the new developers. ๐