For performance reasons, use one div to display text and background color. The opacity attribute will apply to the entire div. If html want to blink text like SVG, then html also need to use two divs in HTML, one to display text and one to display color.
Maybe html can use CSS variables and JS?