I wanted to use html in title attribute value so the code would be like this :
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body>
<img alt="i" data-bs-customClass="custom-tooltip-does-not-work" data-bs-html="true"
data-bs-toggle="tooltip" src="./info-circle-fill.svg"
title=" Test Click Title ">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script>
$(document).ready(function () {
[].slice.call(document.querySelectorAll('img[data-bs-toggle="tooltip"]')).map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl, {
'customClass': 'custom-tooltip',
animated: 'fade',
placement: 'bottom',
trigger: 'click'
})
})
});
</script>
</body>
</html>
also thanks to :
Using Bootstrap 5 to create custom tooltips