JSFiddle - React, Tailwind, and code Playground

by Chris Maloney

HTML

<body>
<svg>
  <!--circle r='10' cx='50' cy='50'/-->
</svg>

</body>

JavaScript

const p = document.createElement('p');
p.textContent = 'hello';
document.body.appendChild(p);

const svg = //document.getElementsByTagName('svg')[0];
document.createElementNS('http://www.w3.org/2000/svg', 'svg');
document.body.appendChild(svg);
const circle = document.createElementNS(
  'http://www.w3.org/2000/svg', 
  'circle');
circle.setAttribute('r', '10');
circle.setAttribute('cx', '50');
circle.setAttribute('cy', '50');

svg.appendChild(circle);