- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello!
What is the best way of putting guide comments inside of an HTML file?
I mean how should I put it to have a well organized file?
thanks!
Alireza.M
Comments in HTML can be entered with ``
Generally though it’s going to add to the page weight so they should be used sparingly.
Perhaps just to mark the start / end of divs / sections.
I would suggest commenting the crap out of your code (which ever language it may be), however, like Paulie_D mentioned, it does at weight to your page. Have a copy just for you which is commented, and whatever you put into production just strip out the comments.
Most of the time (lol…) you dont really need to comment out html or css because developers can read it just fine and understand what you are doing (that only goes for somewhat well written html). Now for javascript, comments are nice because it allows other devs to reference variables, functions, etc.
Thanks!
You can use php comments to comment the ‘html’ without adding weight to the page. (assuming you are using php to generate the html)
or
here */ ?>