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.1.0/dist/jdenticon.min.js" async
        integrity="sha384-VngWWnG9GS4jDgsGEUNaoRQtfBGiIKZTiXwm9KpgAeaRn6Y/1tAFiyXqSzqC8Ga/"
        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.