I heard someone say that there is, so I was wondering.
HTML comment:
<!-- Comment goes here. -->
PHP comment:
<?php // Comment goes here. ?>
What are the negatives of HTML comments? worsens the UX - even not visible, the HTML comments are part of the DOM tree and increase the number of DOM elements. This, in turn, affects the quickness and responsiveness, also leads to slower CSS selectors and DOM manipulation.
This element is used to add a comment to an HTML document. An HTML comment begins with <! –– and the comment closes with ––> . HTML comments are visible to anyone that views the page source code, but are not rendered when the HTML document is rendered by a browser.
Unlike HTML comments, PHP comments don't show up in the final output. That is often desirable, as comments are usually internal notes that are none of anybody's business.
PHP comments will not be visible in the source on the client, where HTML comments will. So the question is: do you want the comment to be readable by the end user?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With