I did a star rating with HTML, CSS and JavaScript. My approach is with JavaScript. As you can see in the below snippet.