You can create a Heart Shape using pure CSS. By utilizing the CSS masking feature, you can apply it to a single element like a div, or you can also use it with any image.
PreviewHTMLCSSJavaScript
Resources
<h1>Heart Shape with CSS </h1>
<div class="heart"></div>
<h1>Heart shape with Image via CSS</h1>
<img src="/img/bg.png" class="heart" alt="random image" />
This HTML, CSS, JavaScript and Bootstrap snippet is free (open-source) hence you can use it in your project.
You can modify the above editor code and see the live update. You can also download the modify code.
Feel free to play with Heart Shape with CSS snippet code.
If you like it then don't forget to share this code with your friends.
Free code snippet playground
Let's share the example by using HTML, CSS, JavaScript and Bootstrap.