JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<p id="div_element">I would like to say: </p>
<script>
$("#div_element").append('<a href="#" id="id_a">test</a>');
alert($('#id_a').html())</script>
</body>
<body>
<p id="div_element">I would like to say: </p>
<script>
$("#div_element").append('<a href="#" id="id_a">test</a>');
alert($('#id_a').html())</script>
</body>