learn-markdown

A simple markdown tutorial.

View the Project on GitHub NSSK-organization/learn-markdown

previous

Links and Lists

In this section, we talk about the different types of lists and links.

Types of lists

There are two types of lists: unordered and numbered. Here’s how to do both.

Unordered lists

To create an unordered list, simply put several different words on newlines, with asterisks (*) before each one. So the list below:

would look like this in markdown:

* Eggs
* Milk
* Spinach
* Bread
* Cheese

Numbered Lists

To create a numbered list, all you have to do is write the numbers in order from 1 (with a period in front of it. So the list below:

  1. Line 1
  2. Line 2
  3. This is line 3
  4. Line 4

would look like this in markdown:

1. Line 1
2. Line 2
3. This is line 3
4. Line 4

There are two ways to create a link in markdown: a one-time link and a reusable link. If you are planning to link one page several times in a document, reusable links are better. If you are planning to link one page once, use a one-time link.

To create a one-time link, follow this syntax:

lorem ipsum [text you want to highlight](linktoredirect.to)

For instance,

Learn more about markdown, click here.

Note: These are sometimes called “reference links”.

To create a reusable link, follow this syntax:

lorem ipsum [text you want to highlight][link name].

[link name]: linktoredirect.to

For instance,

Google is a great search engine, though lacking in privacy. It’s home page allows you to explore the internet with ease.

To create a relative link (if you are redirecting to a file on your computer), include the relative path. For instance,

the previous chapter of the tutorial

To create a URL, include the https:// link.

GitHub

Images

To include images, follow this syntax:

!(alt-text)[link to image]

For instance:

the github logo

Exercises

  1. Create an unordered list with the following names: Abigail, Betty, Cooper, Dylan, Eric, Frank.
  2. Create a numbered list with the same names as exercise 1.
  3. Make this text redirect to YouTube.
  4. Make this text redirect to ../README.md.
  5. Add this image below.

next