JSFiddle - React, Tailwind, and code Playground

by Alex

HTML

<!--
<div style="padding:1rem;margin-bottom:2rem;display:flex;justify-content:space-between;background-color:#d9ffe4;border-radius:0.75rem;">
<a href="https://www.medical-device-university.com" target="_blank" style="color:#0f0f0f;text-decoration:none;">
  <strong>NEW: </strong>Your e-learning short cut to market your medical device in the EU
</a>
<div onclick="this.parentNode.remove()">✕</div>
</div>
-->

<div class="maincontent">

<h1>
Headline und so
</h1>

</div>

JavaScript

;
  function b(m) {
  const t = document.querySelector('.maincontent h1'),
    n = document.createElement('div')
  ;
  n.innerHTML =
    '<div style="padding:1rem;margin-bottom:2rem;display:flex;justify-content:space-between;background-color:#d9ffe4;border-radius:0.75rem;"><a href="https://www.medical-device-university.com" target="_blank" style="color:#0f0f0f;text-decoration:none;"><strong>NEW: </strong>'+m+'</a><div onclick="this.parentNode.remove()">✕</div></div>';
    t.parentNode.insertBefore(n, t)
}
;b('Your e-learning short cut to market your medical device in the EU')