Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to put guide comments inside of HTML files?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #43800
    AlirezaM
    Participant

    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

    #130261
    Paulie_D
    Member

    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.

    #130265
    JohnMotylJr
    Participant

    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.

    #130341
    AlirezaM
    Participant

    Thanks!

    #130348
    CrocoDillon
    Participant

    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 */ ?>

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.