In a CSS sheet, I created a new tag
gb {
color: green;
}
and in the HTML code, I would replace without javascript, all occurences of
<gb> ■ </gb> <!-- green bullet -->
with something like <gb />
. (Like using the C preprocessor, but doing thing in native HTML/CSS, without need to another program (cpp) and action (preprocessing) before sending the page on the web)
In other terms, how could I create custom HTML tag, with content (saving typing the ■
code), but only using HTML/CSS ?
And, yes, a lot of content already address custom HTML tags, but
- They generally use Javascript
- It is not clear
- I can't believe such a little thing could involve these cumbersome solutions.
The idea is just to have a short way to draw an Unicode symbol (and in color) in middle of text.