Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cyb3rdud3

macrumors 601
Jun 22, 2014
4,112
2,799
UK
You can't, the point is that you download the html file and render it in a browser. One way around this is using server side rendering, but with a plain html file its warts and all...
 

organicCPU

macrumors 6502a
Aug 8, 2016
839
296
Cleaning up code before uploading production releases is the way to go.
Depending on your workflow, there are commands in text editors, command line tools or plug-ins for CMS for that task.
 
  • Like
Reactions: cyb3rdud3

cyb3rdud3

macrumors 601
Jun 22, 2014
4,112
2,799
UK
You can use the <!-- comment tag --> syntax to prevent the browser from displaying things, but the site visitor can still see them via View Source or the developer tools. This may or may not accomplish what you want.
True, but naturally if one didn't use that tag in the first place then it wouldn't have been a comment but content 👍
 

avijeet26

macrumors newbie
Mar 21, 2023
2
1
In HTML, you can insert comments using the <!-- --> syntax. Any text placed within these tags will not be displayed by the browser.
 
  • Like
Reactions: yitwail
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.