JSFiddle - React, Tailwind, and code Playground

HTML

<script type="module">
  import { xml, ChildType } from 'https://cdn.jsdelivr.net/npm/xml-template-literal/dist/api.js';
  
  const rootAst = xml`
    <div class="red">Hello World</div>
  `;

  const ast = rootAst.children.filter(n => n.type === ChildType.Node)[0];

  const el = document.createElement(ast.tag);
  el.innerText = ast.children[0].value;
  el.className = ast.attributes[0].value;

  document.body.append(el);
</script>

CSS

.red {
  color: orangered;
}