Markdown

Markdown

INTRODUCTION

Markdown is a lightweight markup language used to create formatted text, typically for publishing on the internet. Formatted text is a digital text that contains codes for font changes, headers, footers, bold, italic and other page and document attributes. Markdown is a style of writing documents that makes it easy to define what the content should look like. It describes headers, text styles, links, lists and so much more. HTML and ReStructuredText are other examples of markup language. ReStructuredText will be briefly discussed in this article.

Markdown is used in articles, notes, and documentation and can be used to build a webpage. When creating a repository using GitHub, you will come across the option to add a “readme.md” file. That “md” stands for markdown. You can also create a readme on your GitHub profile and customize your GitHub profile. Below is a picture of a GitHub readme.md file:

HOW TO USE MARKDOWN

The process of using Markdown can be explained in the following four steps:

  1. Create Markdown file: The first step is to create a Markdown file with “.md” or “.markdown” extension.

  2. Open File in Markdown Application: You need a Markdown application capable of processing the Markdown file. There are lots of applications available such as Typora, Ghostwriter, etc.

  3. Working of Markdown Application: Markdown applications use Markdown processors to take the Markdown-formatted text and output it to HTML format.

  4. View the file in a web browser: The final rendered output of your document can now be viewed in a web browser. Following is the visual representation of the process:

FORMATTING TEXT IN MARKDOWN

Following are some basic syntax for markdown. This is a quick markdown guide:

  1. HEADINGS

For adding headings in Markdown, we use the hashtag sign. For the h1 heading, we add one hashtag. For the h2 heading, we add two hashtags, and so on. Below is an example of the different headings on markdown:

# This is h1 heading
## This is h2 heading
### This is h3 heading

Output:

  1. Italics

To make text italics, we would use either single asterisks or use single underscores. Below is an example of italicized text in Markdown:

*This is first way to make text in italics* 
_This is second way to make text in italics_

**Output:**

  1. Bold

If we want some strong text (or bold text), we can use double asterisks or we can also use double underscores which will make it bold as well. Below is an example of a bold text in Markdown:

**This is first way to make text in bold**
__This is second way to make text in bold__
  1. Blockquote

For inserting a block quote, we use the greater symbol. It gives us a light background and a blue line on the left side. Below is an example of adding blockquote in Markdown:

<!-- Adding Blockquote --> 
>This is a blockquote

The text to be displayed for the link goes in square brackets, and the link will go in round brackets. Below is an example of adding links in Markdown:

<!-- Adding Link with sample text -->
[Upgrad](https://www.upgrad.com/)
  1. Unordered List

Adding an unordered list in Markdown is very easy. Just add one asterisk mark symbol for each item. Below is an example of adding an unordered list in Markdown:

<!-- Unordered List -->
* First Item
* Second Item
* Third Item

  1. Ordered List

Adding an ordered list in Markdown is similar to adding an unordered List. We need to write 1 before each item. Below is an example of adding an ordered list in Markdown:

<!-- Ordered List --> 
1. First Item 
2. Second Item 
3. Third Item

**Output:
**

  1. Markdown Image

The process of adding links is very similar to adding links, except we need to put an exclamation in front of our brackets. Below is an example of adding image in Markdown:

<!-- image --
![Upgrad](https://www.upgrad.com/)

**Output:**

ReStructuredText

ReStructuredText is another example of markup language. reStructuredText (RST) is a plain text markup syntax used for creating structured documents. It is commonly used in the documentation of software projects, as well as for technical writing in general. RST provides a simple way to describe the structure of a document, including headings, lists, tables, and other elements, using easily readable and writable text. It supports the creation of cross-references, links, and other types of hypertext, and can be transformed into other formats such as HTML, PDF, and e-books. Additionally, RST's syntax is designed to be easy to learn and use, making it a popular choice for document authors who want a lightweight and flexible markup language.

CONCLUSION

In conclusion, markup languages play a crucial role in the creation of structured documents and digital content. From HTML, XML, and RST to other more specialized languages, these tools offer a flexible and efficient way to add structure, format, and style to text. They are used in a wide range of applications, from web development and software documentation to e-books and academic writing. With their simple syntax, easy readability, and compatibility with various output formats, markup languages have become essential tools for modern content creation. Whether you are a professional web developer, technical writer, or just someone looking to create organized and well-formatted documents, there is a markup language that can meet your needs.

References

Abhinav Kumar. “What is Markdown? Syntax, Examples, and Benefits”, 29th Dec, 2022( https://www.knowledgehut.com/blog/web-development/what-is-markdown )