Markdown has gained popularity because it's easy to use and it's widely accepted across platforms.
You can use markdown to write content that can be conveyed in plain text. A good example would be a blog post.
In this article, you'll learn what markdown is and how to use it.
What is Markdown?
Markdown is a markup language just like HTML. We use it to parse text and convert it into a specific format. You can also think of it as a text to HTML converter tool.
Many developers like writing in markdown because it gives them fine-grained control over their text and code. We'll see how and why in the coming paragraphs.
In this guide we'll cover the following topics.
- How to create your first markdown file.
- Create a cheat sheet for markdown
- Discuss how markdown can be rendered in VS Code
Tools that Support Markdown
Markdown works in any browser even if you use a simple notepad. But there are certain tools that can help enhance your productivity by providing a real time view (of markdown and rich text) side by side.
The following are some of the tools that support working with markdown:
- VSCode (We'll cover this in this article)
- Sublime text
How to Work with Markdown
Download VSCode and enable the plugin
VSCode is a text editor like notepad, but it has many more capabilities. You can also use it for coding and it supports numerous programming languages.
We'll be using VSCode to write and render markdown files.
You can download VSCode from here.
Once your download is completed, activate the below extension:
How to create your first markdown file
To work with markdown, simply save the text file with
.md extension. After that, you'll be able to apply markdown syntax.
After creating your file and activating the plugin, the workspace should look something like this.
Markdown in action
In markdown, we use a specific syntax to denote headings, bold text, lists, and other text formatting.
You can refer to the table below for an overview of basic markdown syntax:
|* List item * List item
|`insert code here`
Simply start writing in your
.md file and see the results side by side.
How to write code blocks in Markdown
There is language support available for many programming languages in VSCode.
Here are some examples of coding in different languages.
Code blocks for HTML and Bash
Code blocks for Python and JS
Escape characters in markdown
If you want the browser to ignore the syntax and retain the characters, the characters can be escaped using the backslash
For instance, \* would not parse its succeeding characters as italics.
Practical Applications of Markdown
You can use markdown in email templates, and it is a natural fit for technical documentation.
A great example for markdown is the GitHub README.md file. There, code blocks are easily combined with well-formatted text.
Download the Markdown Cheat Sheet
I've compiled all the tips you've learned here in a cheat sheet.
You can download the cheat sheet here.
By now I hope you're confident enough to write your own markdown. Once you get the hang of it, it's easy enough. Apart from being simple, it is also very powerful and widely accepted.
If you found this post helpful, share it :)
Markdown imepata umaarufu kwa sababu ni rahisi kutumia na inakubaliwa sana katika majukwaa. Unaweza kutumia markdown kuandika maudhui ambayo inaweza kuwa alitoa katika maandishi wazi. Mfano mzuri ungekuwa chapisho la blogi. Katika makala hii, utajifunza nini markdown ni na jinsi ya kutumia. Markdown ni nini? Markdown ni lugha ya alama kama HTML. Sisi kutumia yake kuchanganua maandishi na kugeuza katika format maalum. Unaweza pia kufikiria kama maandishi kwa HTML converter chombo. Watengenezaji wengi kama kuandika katika markdown kwa sababu inawapa udhibiti fine-grained juu ya maandishi yao na code. Tutaona jinsi na kwa nini katika mafungu yanayofuata. Katika mwongozo huu tutazungumzia mada zifuatazo. - Jinsi ya kuunda faili yako ya kwanza markdown. Kuunda cheat sheet kwa ajili ya markdown - Kuzungumzia jinsi markdown inaweza kuwa rendered katika VS Code Tools kwamba Support Markdown Markdown kazi katika kivinjari yoyote hata kama wewe kutumia notepad rahisi. Lakini kuna zana fulani ambazo zinaweza kusaidia kuboresha uzalishaji wako kwa kutoa mtazamo wa wakati halisi (wa markdown na maandishi tajiri) kando kando. Vifaa vya kuhariri vinavyoweza kutumika kwa Markdown ni: Viscode (Tutazungumzia hii katika makala hii) - Sublime Text Jinsi ya kufanya kazi na Markdown Download Viscode na kuwezesha Plugin Viscode ni mhariri wa maandishi kama notepad, lakini ina uwezo zaidi. Unaweza pia kutumia kwa ajili ya coding na inasaidia lugha nyingi za programu. Sisi tutakuwa kutumia VSCode kuandika na kutoa markdown faili. Unaweza kupakua VLC kutoka hapa. Baada ya kupakua, fanya kazi ya upanuzi wa md: Jinsi ya kuunda faili yako ya kwanza ya markdown Ili kufanya kazi na markdown, tu kuhifadhi faili ya maandishi na upanuzi wa.md. Baada ya hapo, utakuwa na uwezo wa kutumia markdown syntax. Baada ya kuunda faili yako na kuamsha Plugin, eneo la kazi inapaswa kuangalia kitu kama hiki. Markdown katika hatua Katika markdown, sisi kutumia syntax maalum kuonyesha vichwa vya habari, maandishi bold, orodha, na format nyingine maandishi. Unaweza kutaja meza hapa chini kwa muhtasari wa msingi markdown syntax: * Orodha item * Orodha item * < insert code here > tu kuanza kuandika katika faili yako.md na kuona matokeo upande kwa upande. Jinsi ya kuandika vitalu vya kificho katika Markdown Kuna msaada wa lugha inapatikana kwa lugha nyingi za programu katika VSCode. Hapa ni baadhi ya mifano ya coding katika lugha tofauti. "Kifungu cha code kwa ajili ya HTML na Bash: ""Kifungu cha code kwa ajili ya Python na JS: ""Kufungua herufi katika markdown"" - Kama unataka browser kupuuza syntax na kuhifadhi herufi, herufi inaweza kuokolewa kwa kutumia backslash, kwa mfano, """" haitafakari herufi zake kufanikiwa kama italics. """ Matumizi ya vitendo ya Markdown Unaweza kutumia markdown katika templates barua pepe, na ni fit asili kwa ajili ya nyaraka za kiufundi. Mfano mzuri kwa markdown ni GitHub README.md faili. Huko, vipande vya nambari huunganishwa kwa urahisi na maandishi yaliyo na muundo mzuri. Kuondoa Markdown Cheat Sheet: Jinsi ya kuondoa Markdown Cheat Sheet Unaweza kupakua karatasi ya udanganyifu hapa. Kwa sasa natumaini wewe ni uhakika wa kutosha kuandika markdown yako mwenyewe. Mara baada ya kupata kunyongwa ya hayo, ni rahisi kutosha. Mbali na kuwa rahisi, pia ni yenye nguvu sana na inakubaliwa sana. Kama umepata chapisho hili kusaidia, kushiriki yake :)