Some web developers prefer to use HTML comments to document their code, others don't like it and not used it. What are the real benefits of using HTML comments for a web application in practice? Is it worth to use comments in general?
Comment is a code or text content enclosed in
--> which are ignored by browsers, i.e. not displayed and
not visible by end-users.
<!-- This is a comment -->
In general, it's totally OK to use HTML comments. But I've seen websites with HTML comments denotes closing tags, that results in significant increase of page size up to 30%. So, if you aim to have a quick and responsive web app, and to gain an "A" grade for web performance, as well as to rank better in SERP - I've highly recommend staying away from the extensive use of comments.
Tell me your thoughts about HTML comments by leaving a comment below. Sharing this article would be great. Thanks for reading.
Join our mailing list and stay tuned! Never miss out news about Zino UI, new releases, or even blog post.