Markdown Emphasis
Markdown supports following emphasis.
- Bold
- Italics
- Strikethrough
- Bold and Nested Italics
- Bold and Italics
Markdown Bold
There are 2 different way to bold a text in Markdown.
- Use two asteriks before and after a word or phrase
- Use two underscores before and after a word or phrase
Markdown | HTML Equivalent | Rendered Output |
---|---|---|
**I am Bold text** | <strong>I am Bold text</strong> | I am Bold text |
This is a **bold text** | This is a <strong>bold text</strong> | This is a bold text |
This is a __bold text__. | This is a <strong>bold text</strong> | This is a bold text. |
I**love**Markdown | I<strong>love</strong>Markdown | IloveMarkdown |
Best Practices
The best practice is to use double asterik instead of doubele underscore to bold the text. Not all the applications supports double underscore if you want to bold words in middle.
✅ Do this | ❌ Don't do this |
---|---|
I**am**bold | I__am__bold |
Markdown Italics
There are 2 different way to italicize a text in Markdown.
- Use single asterik before and after a word or phrase
- Use single underscore before and after a word or phrase
Markdown | HTML Equivalent | Rendered Output |
---|---|---|
*I am Italicized text* | <em>I am Italicized text</em> | I am Italicized text |
This is a *Italicized text* | This is a <em>Italicized text</em> | This is a Italicized text |
This is a _Italicized text_. | This is a <em>Italicized text</em> | This is a Italicized text. |
I*love*Markdown | I<em>love</em>Markdown | IloveMarkdown |
Best Practices
The best practice is to use single asterik instead of single underscore to Italicize the text. Not all the applications supports underscore if you want to Italicize words in middle.
✅ Do this | ❌ Don't do this |
---|---|
I*am*Italicized | I_am_Italicized |
Markdown Strikethrough
Strikethrough also known as crossed out text indicates the text is not longer required or to be removed. You can strikethrough the text by putting a horizontal line through the center of the text. This is an example of strikethrough text.
In markdown you can strikethrough the text by using two tildes before and after a word or phrase.
Markdown | HTML Equivalent | Rendered Output |
---|---|---|
~~This is mistaken text~~ | <s>This is mistaken text</s> | |
This is a ~~mistaken text~~ | This is a <s>mistaken text</s> | This is a |
I~~don't~~loveMarkdown | I<s>don't</s>loveMarkdown | I |
Markdown Underline
Markdown does not have a defined syntax to underline the text.
For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.