I have commented out a line in HTML in Magento store however when I go to Chrome and click on Inspect Elements, I still see the code but its commented out.
What can I do to prevent the HTML code i have commented out to make it invisible from Inspect Elements ?
I don't want to delete the commented out section in case I will need it later on.
Any solutions ?
HTML comments are part of an HTML document. They are not rendered for display by the browser, but they are part of the document sent from the server to the client machine. Thus HTML comments are visible when inspecting element or when viewing the source.
I believe Magento store is written in PHP and you could comment out the line in the php file like this
<?php
/*
line to comment out
*/
?>
The HTML document the PHP sends back to the browser will not contain that comment.
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