Search code examples
githubmarkdown

How to escape the (hash) # sign in a GitHub markdown header? (backslash is not working)


I have the following code on a README.md file on GitHub, where I am trying to display the hash sign on a header (I am trying to escape it using the \ symbol) like so:

### C\#
* [Beginning Game Programming with C#](https://www.coursera.org/course/gameprogramming)

However it renders like so:

Not good

I obviously want the hash sign to appear on the header, and I also tried to use a double backslash, but it didn't work. How do I get the pound sign to appear?

EDIT: the linked question deals with GitHub links, my question is to do with headers on a .md file.


Solution

  • You could try and add a matching '#', followed by one extra '#':

    ### C# #