text highlight in markdown

Grey-colored Higlighting Solution

A possible solution is to use the <code> element:
This solution works really well on git/github, because git/github doesn't allow css styling.

OBS!:
Using the code-element for highlighting is not semantic.
However, it is a possible solution for adding grey-colored highlighting to text in markdown.

Markdown/HTML

<code> <i>This text will be italic</i> <b>this text will be bold</b> </code>

Output

This text will be italic this text will be bold


I'm late to the party but it seems like a couple of markdown platforms (Quilt & iA Writer) are using a double equal to show highlighting.

==highlight==

Typora is also using double equal for highlighting. It would be nice it that becomes a CommonMark standard, as mentioned by DirtyF. It would be nice for those who use it frequently, since it is only 4 repeated chars: ==highlight==

If you want the option to use multiple editors, it may be best to stick with <mark>highlight</mark> for now, as answered by Matthias.

Here is the latest spec from CommonMark, "which attempts to specify Markdown syntax unambiguously". Currently "highlighting" is not included.

Editors using ==highlight== from comments mentioned previously:

  • Typora
  • Obsidian
  • Quilt
  • IA Writer

Feel free to add to this list.


As the markdown documentation states, it is fine to use HTML if you need a feature that is not part of Markdown.

HTML5 supports

<mark>Marked text</mark>

Else you can use span as suggested by Rad Lexus

<span style="background-color: #FFFF00">Marked text</span>