A problem regarding code blocking

I have encountered a problem while using code blocking.
Recently I have started learning HTML and been using obsidian to keep tab of what I have learnt.

I am aware of this ``` three backticks to write code blocks but the text before these backticks get colored in black.


As you can see the source code editor and view mode shows two different results. May someone point out what’s the problem here?

It’s hard to say without seeing the actual text but I’m guessing you need to put a blank line before or after the code block. In general it’s best to put blank lines between different Markdown things (even when it’s not strictly required).

If that isn’t the problem, paste the actual text here so we can see it (you can mark the whole pasted text with 4 backticks so the code blocks in the text don’t mess it up).

2 Likes