Many times, as beginners, when we start programming and begin creating project repositories or explore some repositories especially those hosted on platforms like GitHub, we often come across a file called README.md. This file is usually the first point of contact for users and developers who want to understand the purpose, setup, and usage of a project.
The README.md file contains documentation added by the project owner, but along with the actual text content, you'll often see extra symbols. These extra symbols are part of a markup language called Markdown.
Markdown is a lightweight markup language used to format text, which is easy to write and read. It allows us to organize content with simple markup rules to include elements like headings, tables, images, code blocks, and font styling.
Markdown files have the .md or .markdown extension. Its most commonly used in README file, documentation, blogs post and even this article is written in Markdown.
Now, let’s see some elements of markdown language.
Headings
Headings make your text more readable and help you organize different topics. A heading is created by adding # character before the heading text. Numbers of # symbols determines the level of the heading.
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Paragraph
You don't have to add any extra symbols for creating paragraphs. To split content into different paragraphs simply insert a blank line.
paragraph 1
paragraph 2
paragraph 1
paragraph 2
Emphasized text
Bold - Bold Text or bold text
Italics - Italic Text or italics
Strikethrough - crossed off
Bold - **Bold Text** or __bold text__
Italics - *Italic Text* or _italics_
Strikethrough - ~~crossed off~~
For some element you can use html as well.
Highlight: highlighted text
Superscript: 642
Subscript: h2o
Highlight: <mark>highlighted text</mark> Superscript: 64<sup>2</sup> Subscript: h<sub>2</sub>o
List
We can have both ordered and unordered list, we can also use nesting in list.
- Unordered list can use asterisks
- Or minuses
- Or pluses
- ordered list need to have number followed by dot
- Actual numbers don't matter, just that it's a number
- ordered item 3
- ordered item 3
- unordered item 1
- unordered item 2
- nested item 1
- nested item 2
- unordered item 3
// unordered list
* Unordered list can use asterisks
- Or minuses
+ Or pluses
// ordered list
1. ordered list need to have number followed by dot
2. Actual numbers don't matter, just that it's a number
1. ordered item 3
1. ordered item 3
// Nested list
* unordered item 1
* unordered item 2
* nested item 1
* nested item 2
* unordered item 3
Links
There are few different ways to create links.
Google Maps
Google link with title
Google Link
Reference to a repository file
When we want to use actual URL as text.
[Google Maps](https://www.google.com/maps)
[Google link with title](https://www.google.com "Sample title text")
[Google Link][case-insensitive reference text]
[Reference to a repository file](../blob/master/LICENSE)
<https://www.google.com/maps>
[case-insensitive reference text]: https://www.mozilla.org
Images
There are two ways to add images.
Inline-style:

Reference-style:
![alt text][logo]
Quote
Quote text
Quote break
This is a very long line that will still be quoted properly when it wraps. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
> Quote text
> Quote
Horizontal Rule
Horizontal rules can be added by adding three or more asterisk , dashes or underscore (*, -, _)
// You need to add three or more
***
---
___
Code and Syntax Highlighting
We can add code block with syntax highlighting by wrapping them in single back-ticks or triple backticks for code multiple lines
Inline code
has back-ticks around
it. Eg: let max_Number= 0
Multiple lines with particular language
```javascript
var s = "JavaScript syntax highlighting";
alert(s);
```
```python
s = "Python syntax highlighting"
print s
```
```
No language indicated, so no syntax highlighting.
But let's throw in a <b>tag</b>.
```
function render (text) => {
return text
}
var s = "JavaScript syntax highlighting";
alert(s);
s = "Python syntax highlighting"
print s
No language indicated, so no syntax highlighting.
But let's throw in a <b>tag</b>.
Table
Tables are not part of the core Markdown spec, but they are part or GitHub Flavored Markdown (GFM) and Markdown Here supports them. Table cell alignment might not work on all sites that supports Tables
Colons can be used to align columns.
| Tables | Are | Nice |
| ------------- |:-------------:| -----:|
| item 3 is | right-aligned | $2500 |
| item 2 is | centered | $89 |
| alternate row | are neat | $6 |
There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.
Markdown | Not | Pretty
--- | --- | ---
*but* | `renders` | **perfectly**
1 | 2 | 3
Tables | Are | Nice |
---|---|---|
item 3 is | right-aligned | $2500 |
item 2 is | centered | $89 |
alternate row | are neat | $6 |
Markdown | Not | Pretty |
---|---|---|
but | renders |
perfectly |
1 | 2 | 3 |
There are some features which might not work on some platforms because there are different flavors (versions) of markdown. Every Markdown application implements a slightly different version of Markdown.
For details please refer the particular version of application you are using.
Top comments (0)