This is an issue I've seen even experienced developers struggle with. Personally, I use a similar approach to the 4th HTML method, which looks clean enough for my team. Thanks for writing this article.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.