Techtales.

Markdown Tutorial: From Basics to Advanced 🚀🚀
TT
Techtales Team✨Author
Oct 25, 2024
3 min read

Markdown Tutorial: From Basics to Advanced 🚀🚀

23

Markdown is a lightweight markup language that formats text with simple syntax. It's widely used for blog posts, documentation, and code comments. In this comprehensive guide, we'll cover all the essential Markdown elements, empowering you to easily write beautifully formatted content.

Headings

Headings are used to structure your content and create a hierarchy. Use the pound sign (#) to create headings of different levels:

Emphasis

You can emphasize text using bold, italic, or both:

This will display as:

Bold text

Italic text

Bold and italic text

Links

Links are crucial for providing context and directing readers to relevant resources. Use square brackets [ ] for the link text and parentheses () for the URL:

This will display as:
This is a link

Images

Images add visual interest and enhance your content. Use an exclamation mark (!) followed by square brackets [ ] for the alt text and parentheses () for the image URL:

This will display as:

github logo

Hyperlink and Images both syntax are same expect one exclamation mark (!) which is point beginning of the Images tag.

Lists

Markdown supports both ordered and unordered lists:

Ordered Lists

Use numbers followed by a period (.) to create ordered lists:

Unordered Lists

Use hyphens (-), asterisks (*), or plus signs (+) to create unordered lists:

Nested Lists

This will display as:

  1. Item 1
    • Sub-item 1
    • Sub-item 2
  2. Item 2
    • Sub-item 1
    • Sub-item 2

Code Blocks

Code blocks are essential for displaying code snippets within your content. Use triple backticks (```) to wrap the code:

This will display as:

Inline Code

To add inline code blocks, just add ` ` between the words. For example, 

This would display as:

This website uses prism.js for syntax highlighting.

BlockQuotes

To create a blockquote, start a line with greater than > followed by an optional space. Blockquotes can be nested, and can also contain other formatting. To keep the quote together, blank lines inside the quote must contain the > character.

This will display as:

I am not in danger, Skyler. I am the danger. A guy opens his door and gets shot, and you think that of me? No. I am the one who knocks!

Tables

Tables allow you to organize data effectively:

This will display as:

Header 1

Header 2

Row 1, Column 1Row 1, Column 2
Row 2, Column 1Row 2, Column 2

Horizontal Rules

Use three or more hyphens (-) to create a horizontal rule:

Line Breaks

To create a line break, use two spaces at the end of a line, followed by a new line:

Escaping Characters

If you need to use a special character like a backslash (\) or an asterisk (*) within your text, escape it with a backslash (\):

Conclusion

Now you're equipped with the essential Markdown knowledge to write beautifully formatted content. Practice these elements and explore further advanced features to unlock the full potential of Markdown. Don’t wait for the perfect moment to learn Markdown. The power to simplify and enhance your writing is already within your reach. Start today, and watch how this simple tool transforms the way you create, share, and collaborate. Happy writing!

Resources

Markdown can render differently on various platforms and you can preview how your code will look on MarkdownLivePreview. Other useful resources include:

  • CommonMark – A markdown specification with better clarity and compatibility
  • babelmark3 - A tool to see and compare the output of different markdown engines for a given input.
2
3