Give help. Get help.

  • # March 31, 2013 at 4:44 am


    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?



    # March 31, 2013 at 5:27 am

    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.

    # March 31, 2013 at 6:24 am

    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.

    # April 1, 2013 at 1:40 pm


    # April 1, 2013 at 3:59 pm

    You can use php comments to comment the ‘html’ without adding weight to the page. (assuming you are using php to generate the html)

    < ?php // comment here ?>


    < ?php /* multiline comment
    here */ ?>

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.