Vanilla JS

Include the Jdenticon library somewhere on your page. Below is Jdenticon served from jsDelivr, but you can download and host it yourself as well.

<script src="https://cdn.jsdelivr.net/npm/jdenticon@3.2.0/dist/jdenticon.min.js" async
        integrity="sha384-yBhgDqxM50qJV5JPdayci8wCfooqvhFYbIKhv0hTtLvfeeyJMJCscRfFNKIxt43M"
        crossorigin="anonymous">
</script>

Add an <svg> element where you want to render an identicon. Use the data-jdenticon-value attribute to specify that an identicon should be rendered. user127 below is just an example of a value.

<svg width="80" height="80" data-jdenticon-value="user127"></svg>

Refresh the page in your browser.