Change the color of text, via custom markup syntax?

What I’m trying to do

Hello I am trying to create some custom syntax markup, similar to the ***, **, * that I have seen already. These do
*** - changes the color to a blue gradient from light blue to dark purple.
** - changes the color to light green, mint.
* - changes the text to bold and white.

I am looking to know if there is a way to create custom markup, such as &*( which will allow me to apply a custom css to the text that is between the beginning and ending markup.
IE

  1. build custom markup syntax, for an example we will create 3 &*(, ^^&,^^^.
  2. append a css property to it
  3. use in notebook
&*(caution this is important&*(    -> text is red applied css class `danger-red`
^^&great news about the event^^&    -> text is a green to yellow gradient css class `sunshine-text`
^^^Something is wrong^^^     -> text is a red to yellow to blue gradient css class `kinda-important-text`.

Things I have tried

I just use ***, **, *, or I use

text that is dangerous
. But would like the option to reduce the size of the writing text to a few special characters.

this was suppose to be a div in html. did not know that the forum read html an rendered it.

I tried editing your post. Hope I got it right.

You can put code between triple backticks like this:

```
Your code here
```