Markdown syntax

I am new to Markdown, I have added a CSS and tested the basic syntax, everything working in a clean and handy way still i cannot find out how to have various colors to highlight and how to justify a text …
Thankyou for your help

1 Like

Take a look at the following document which explains answers to your questions, and so many others about using CSS (Cascading Style Sheets). There are of course many other “interweb” resources, along with many published books.

If I understand the OP correctly, they want to use different colors for text that is highlighted in markdown.
This might not be possible at all: the highlighted text will be represented in a mark element in HTML, I think. And one can’t discern these elements in CSS as it’s not possible to assign a class to them via Markdown.
One can make stand out every mark in red or the first one in blue and the second one in green etc in CSS. But without classes, it’s not possible to assign colors to arbitrary mark elements.

1 Like

I know very little about CSS, but I also have a need to highlight certain sections of markdown text using colour. I use <span style="color:brown">text I want to highlight</span>. I don’t know if this is what you need. I may not be the best way, but it works for me. I have set up a snippet using Raycast so I just type “/c” and it creates the html code and moves the cursor to the point between the two ends of the code.
I hope this helps.

That could be accomplished with pure MD using the highlight tags from CriticalMD if you can live with a single color. Otherwise, your approach is as good as any other mixing HTML into the MD.

However, since you’re introducing HTML in your MD anyway, you might want to do it semantically correct.

<mark style="color:brown">text to highlight</mark>

is the same amount of work, but it makes clear that you want to highlight something here, not only to give some characters a different color.