Computer scienceFundamentalsEssentialsStandards and formatsMarkup languages

Markdown

4 minutes read

Introduction

Markdown is a lightweight markup language that allows you to format plain text. With it you can add titles in articles, make words bold or italicized, insert lists, and much more. At the same time, the original text will be understandable and easily readable for people. Using Markdown is a good idea to design short and simple text, such as posts in messengers and forums, README files. In this topic, you will learn the basic Markdown syntax and where to use it.

Headings

In order to divide text into sections and to better organize the hierarchy within the document, we use headings. They help readers navigate the text more quickly.

To make a heading in Markdown, just write hash (#) in front of the text. One symbol means a first-level heading, two symbols mean a second-level heading, and so on. Let's take a look at some clear examples of how to create headings.

Markdown Result

# Solar System

a first-level heading using Markdown

## Planets

a second-level heading using Markdown

### Jupiter

a third-level heading using Markdown

There are a total of six levels of headings. This is more than enough for practical purposes, most documents use two or three levels. Remember to use the first-level heading only once. Follow the hierarchy: second-level headings are recommended to be used only after first-level headings.

Font style

With Markdown you can change the font style. For instance, to highlight text in bold, add two asterisks (**) before and after this text. Bold type is used when you want to emphasize certain words or phrases. For example, you can highlight important terms or names of something with it.

Markdown Result
**Jupiter** is the fifth planet from the Sun. Jupiter is the fifth planet from the Sun.

You can also draw readers' attention to words by using italics. To do this, add a single asterisk (*) before and after the text.

Markdown Result
*Galileo Galilei* discovered Jupiter's four largest moons. Galileo Galilei discovered Jupiter's four largest moons.

You can also create a crossed out text with the help of ~~:

Markdown Result
~~Pluto is a planet~~. As for now, Pluto is classified as a dwarf planet. Pluto is a planet. As for now, Pluto is classified as a dwarf planet.

You can combine these features to format your text.

Lists

Markdown syntax also allows you to create ordered/unordered lists and nest them within each other. Ordered lists are numbered, and unordered lists are marked.

For ordered lists, all you need to do is add positions with numbers followed by dots in front of the text. To create an unordered list, you need to add the -, *, or + symbol in front of the text that will become an item of your unordered list. To nest a list in another, add spaces like in the example below.

Markdown Result
- Moons of Jupiter
  - Io
  - Europa
  - and so on
- Spacecrafts in flyby missions
  1. Pioneer 10
  2. Pioneer 11
  3. and others
unordered and ordered lists using Markdown

Quotes

If you need to quote someone, Markdown can help you with that too. To turn a text into a quote, put an angle bracket (>) in front of it.

Markdown Result
> Jupiter is the largest planet in the Solar System. a quote using Markdown

This feature makes Markdown convenient on websites that allow people to communicate with each other.

Conclusion

Markdown provides many options for formatting textual information, we've just introduced you to some of them. You can find more information about Markdown syntax by visiting the markdownguide.org site.

Markdown is often used for writing blogs, documentation, and project descriptions on Github and Gitlab. The usability and simplicity of the text design were appreciated by the Stack Overflow site, where programmers can ask questions and exchange experiences. Markdown syntax is used in products that help organize teamwork on projects, like Trello or Jira. Now, let's proceed to the tasks.

122 learners liked this piece of theory. 1 didn't like it. What about you?
Report a typo