What do you use to make Comments

Discussion in 'HTML' started by JCO, Jan 9, 2004.

  1. JCO

    JCO Guest

    What do you use to make comments in your HTML code?
    Sorry that I'm a newbeee!
    JCO, Jan 9, 2004
    #1
    1. Advertising

  2. JCO

    Dylan Parry Guest

    JCO wrote:

    > What do you use to make comments in your HTML code?


    <!-- I am a comment -->

    > Sorry that I'm a newbeee!


    No need to apologise, we were all newbies once. I would suggest however
    that you use Google for simple questions like this, as you are likely to
    get an answer quicker and you'll feel better for finding out for yourself,
    just try a search like "HTML comments" and you're bound to find the answer :)

    --
    Dylan Parry
    http://www.webpageworkshop.co.uk - FREE Web tutorials and references
    Dylan Parry, Jan 9, 2004
    #2
    1. Advertising

  3. JCO

    brucie Guest

    in post <news:hUFLb.306$>
    JCO said:

    > What do you use to make comments in your HTML code?


    the same as the rest of my markup - a pointy stick

    --
    brucie
    10/January/2004 08:45:43 am kilo
    brucie, Jan 9, 2004
    #3
  4. JCO

    Richard Guest

    JCO wrote:

    > What do you use to make comments in your HTML code?
    > Sorry that I'm a newbeee!


    Within html <!-- comment -->
    within scripts //
    Richard, Jan 10, 2004
    #4
  5. Richard wrote:

    > Within html <!-- comment -->
    > within scripts //


    Within JavaScript //
    Within VBScript '

    Within CSS /* comment */

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Jan 10, 2004
    #5
  6. JCO

    JCO Guest

    Thanks all of you!
    I'm C++ programmer but never messed with html until starting to look at
    FrontPage.
    Thanks again.

    "Toby A Inkster" <> wrote in message
    news:p...
    > Richard wrote:
    >
    > > Within html <!-- comment -->
    > > within scripts //

    >
    > Within JavaScript //
    > Within VBScript '
    >
    > Within CSS /* comment */
    >
    > --
    > Toby A Inkster BSc (Hons) ARCS
    > Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    >
    JCO, Jan 10, 2004
    #6
  7. JCO

    Dylan Parry Guest

    JCO wrote:

    > I'm C++ programmer but never messed with html until starting to look at
    > FrontPage.


    Here's a tip for you then :) As a C++ programmer you would know that you
    can't trust a WYSIWYG program to create code for you, and MS FrontPage is
    no exception! If you are seriously wanting to learn HTML, then consider
    dropping the WYSIWYG and use a simple text editor, even Notepad will so ;)

    --
    Dylan Parry
    http://www.webpageworkshop.co.uk - FREE Web tutorials and references
    Dylan Parry, Jan 10, 2004
    #7
  8. JCO

    JCO Guest

    I certainly believe you, however, I don't want to learn html.
    I simply had no choice but to do a simple edit on a FrontPage web and wanted
    to comment the simple function that I added.

    Thanks!

    "Dylan Parry" <> wrote in message
    news:p...
    > JCO wrote:
    >
    > > I'm C++ programmer but never messed with html until starting to look at
    > > FrontPage.

    >
    > Here's a tip for you then :) As a C++ programmer you would know that you
    > can't trust a WYSIWYG program to create code for you, and MS FrontPage is
    > no exception! If you are seriously wanting to learn HTML, then consider
    > dropping the WYSIWYG and use a simple text editor, even Notepad will so ;)
    >
    > --
    > Dylan Parry
    > http://www.webpageworkshop.co.uk - FREE Web tutorials and references
    >
    JCO, Jan 11, 2004
    #8
  9. JCO

    Whitecrest Guest

    In article <>,
    says...
    > > I'm C++ programmer but never messed with html until starting to look at
    > > FrontPage.

    >
    > Here's a tip for you then :) As a C++ programmer you would know that you
    > can't trust a WYSIWYG program to create code for you....


    No one builds a GUI application in C without using a WYSIWYG generated
    code. Visual Studio, Borland C, even GNU create code for you when
    building an application. And thank god they do. Who wants to write all
    the BS common code to handle a button event? I will tell it what to do
    when the event happens, but I dont want to deal with the code that
    triggers the actual event (Message maps etc...) The GUI stepping in
    adding common code has been a godsend to application developers.

    Well up to date developer that is. You can still use Notepad you write
    all your C application, and debug with printf's if you like. But no one
    will hire you.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jan 11, 2004
    #9
  10. Whitecrest wrote:

    > No one builds a GUI application in C without using a WYSIWYG generated
    > code.


    You're just talking crap about stuff you know nothing about Whitecrest.

    Most GUI applications for Unix/Linux, most Java applets and many graphical
    applications for Windows are written in text editors.

    > Who wants to write all the BS common code to handle a button event?


    You don't need to -- that's what graphical toolkits are for. You write a
    line of code to create a button, something like:

    myButton = new Button;

    Then assign a few properties:

    myButton.setText("Click Here");

    And add event listeners:

    myButton.addEvent("click", myFunction);
    void myFunction() {
    do this;
    do that;
    }

    This is the way that *most* applications are written. Outside the VB
    community, anyway.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Jan 11, 2004
    #10
  11. JCO

    JCO Guest

    I agree with you Toby.
    As a Visual C ++ developer, which is already tedious programming, the last
    thing I need to do it get into the lower level details. I don't even care
    to get into the Assembly Code, but sometimes you have to look it.

    We are off the subject!

    I simply had to add a 5 line script to each of my htm pages so that they
    will programmatically call my frame set. It works great. I'm a person that
    likes to document my code in detail. That all their is to it.

    Thanks everyone for the help, I appreciate it.

    "Toby A Inkster" <> wrote in message
    news:p...
    > Whitecrest wrote:
    >
    > > No one builds a GUI application in C without using a WYSIWYG generated
    > > code.

    >
    > You're just talking crap about stuff you know nothing about Whitecrest.
    >
    > Most GUI applications for Unix/Linux, most Java applets and many graphical
    > applications for Windows are written in text editors.
    >
    > > Who wants to write all the BS common code to handle a button event?

    >
    > You don't need to -- that's what graphical toolkits are for. You write a
    > line of code to create a button, something like:
    >
    > myButton = new Button;
    >
    > Then assign a few properties:
    >
    > myButton.setText("Click Here");
    >
    > And add event listeners:
    >
    > myButton.addEvent("click", myFunction);
    > void myFunction() {
    > do this;
    > do that;
    > }
    >
    > This is the way that *most* applications are written. Outside the VB
    > community, anyway.
    >
    > --
    > Toby A Inkster BSc (Hons) ARCS
    > Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    >
    JCO, Jan 11, 2004
    #11
  12. JCO

    Whitecrest Guest

    In article <MD6Mb.5757$>,
    says...
    > I certainly believe you...


    Have a back bone. What C++ development application do you use,that
    agrees with that statement?

    > I simply had no choice but to do a simple edit on a FrontPage web and wanted
    > to comment the simple function that I added.


    There is the truth, you had no choice. FP is a fine editor. People here
    are a little anal about WYSISYG editors because they thing that you are
    too stupid to look at the code after you the WYSIWYG editor lets you
    easily lay the page out.

    Now to answer your question

    An HTML comment begins with "<!--", ends with "-->" and does not contain
    "--" or ">" anywhere in the comment.

    http://www.htmlhelp.com/reference/wilbur/misc/comment.html
    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jan 11, 2004
    #12
  13. JCO

    Whitecrest Guest

    In article <>,
    says...
    > > No one builds a GUI application in C without using a WYSIWYG generated
    > > code.

    > You're just talking crap about stuff you know nothing about Whitecrest.


    Sure I don't. I have been developing C based application for the last
    12 years. I have gone from Turbo C to Borland C++ Professional to
    Visual C++ 1.5 to Visual Studio to .net. For the last 3 years I have
    been developing Web based Multimedia applications for the Entertainment
    industry, which require a huge back end to manage and produce, archive
    and manage live web casts. As of 30 days ago, I only film and record in
    my home studio. (I believe you will find a similar resume about 2 years
    ago prompted by a gentleman named Chip if you search Google)

    It was required by every single company I have ever worked for, or
    contracted with, that you understand how to develop GUI applications
    using (most of the time Visual C++) the development tool of choice by
    the company.

    > Most GUI applications for Unix/Linux, most Java applets and many graphical
    > applications for Windows are written in text editors.


    Oh pu-pu. There may be a text editor in the development tool you use,
    but, but you don't sit there with a blank screen and say "hmmm, I think
    the coordinates of the text field will be (20,20). You draw it. Then
    you press a button and tell the development tool you want to add a
    handler for the button. It asks you the name, adds the appropriate code
    that must be there no matter who creates it, to handle the button press,
    and opens a text editor with the cursor sitting in the right place to
    start typing your code. If you are using Visual C++ and Visual Studio
    then there is even a comment waiting for you there saying to "add your
    code here"

    So they ALL generate code for you. Every single one of them. And that
    is what I disagree with originally, the statement, that if you are a C
    programer then you obviously know that you never depend on code written
    by the interface. I totally disagree. You most certainly do rely on a
    lot of code created by the interface. His statement is wrong. Period.

    And if you are a C programmer developing GUI applications then you know
    that is wrong too.

    Creating GUI based application (windows or *nix) without these tools is
    completely archaic. Thats why these tools are included in virtually
    every single development environment for *nix or Windows applications.
    (including Java)

    > > Who wants to write all the BS common code to handle a button event?

    > You don't need to -- that's what graphical toolkits are for. You write a
    > line of code to create a button, something like:


    Ah so you are agreeing with me then. C programmers do in fact rely on
    code generated by the development interface. Never mind, from your tone
    you it sounded like you were either disagreeing with me, or did not
    understand what I said.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jan 11, 2004
    #13
  14. Whitecrest wrote:

    > An HTML comment begins with "<!--", ends with "-->" and does not contain
    > "--" or ">" anywhere in the comment.


    An HTML comment may contain '>'.

    <!-- I am>a valid<>comment. -->

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Jan 11, 2004
    #14
  15. Whitecrest wrote:

    > In article <>,
    > says...
    >> > No one builds a GUI application in C without using a WYSIWYG generated
    >> > code.

    >> You're just talking crap about stuff you know nothing about Whitecrest.

    >
    > Sure I don't. I have been developing C based application for the last
    > 12 years.


    [snip]

    >> You don't need to -- that's what graphical toolkits are for. You write a
    >> line of code to create a button, something like:

    >
    > Ah so you are agreeing with me then. C programmers do in fact rely on
    > code generated by the development interface.


    Writing C code for 12 years, but you don't understand the different
    between using a graphics toolkit and using a graphical GUI editor?

    Using a graphics toolkit involves typing source code directly into a text
    editor. No whizzy point and click nonsense.

    For example:

    ===============================================
    #include <gtk/gtk.h>

    static void hello( GtkWidget *widget, gpointer data ) {
    g_print ("Hello World\n");
    }

    static gboolean delete_event( GtkWidget *widget, GdkEvent *event, gpointer data ) {
    g_print ("delete event occurred\n");
    return TRUE;
    }

    static void destroy( GtkWidget *widget, gpointer data ) {
    gtk_main_quit ();
    }

    int main( int argc, char *argv[] ) {
    GtkWidget *window; GtkWidget *button;
    gtk_init (&argc, &argv);
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (delete_event), NULL);
    g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL);
    gtk_container_set_border_width (GTK_CONTAINER (window), 10);
    button = gtk_button_new_with_label ("Hello World");
    g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (hello), NULL);
    g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK (gtk_widget_destroy), G_OBJECT (window));
    gtk_widget_show (button);
    gtk_widget_show (window);
    gtk_main ();
    return 0;
    }
    ===============================================

    Typing in all this into a text-editor directly -- not auto-generating it
    via said whizzy whizzy.

    Yes, this is how the majority of serious applications are developed.

    This is certainly not analogous to using FrontPage.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Jan 11, 2004
    #15
  16. JCO

    rf Guest

    " JCO" <> wrote in message
    news:3qeMb.4839$...
    > I agree with you Toby.


    > As a Visual C ++ developer, which is already tedious programming, the last
    > thing I need to do it get into the lower level details. I don't even care
    > to get into the Assembly Code, but sometimes you have to look it.


    To be able to properly debug code it is IMHO essential to understand
    Assembly. Not perhaps to write but certainly to read.

    > We are off the subject!


    > I simply had to add a 5 line script to each of my htm pages so that they
    > will programmatically call my frame set. It works great. I'm a person

    that
    > likes to document my code in detail. That all their is to it.


    <tongue position="cheek">
    What? Document? Bah. If it was hard to write it should be hard to maintain
    :)
    <tounge>

    Cheers
    Richard.
    rf, Jan 11, 2004
    #16
  17. JCO

    Whitecrest Guest

    In article <>,
    says...
    > > An HTML comment begins with "<!--", ends with "-->" and does not contain
    > > "--" or ">" anywhere in the comment.

    > An HTML comment may contain '>'.
    > <!-- I am>a valid<>comment. -->


    According to the WDG:

    The definition of an SGML comment is basically as follows:
    A comment declaration starts with <!, followed by zero or more comments,
    followed by >. A comment starts and ends with "--", and does not contain
    any occurrence of "--".
    This means that the following are all legal SGML comments:
    <!-- Hello -->
    <!-- Hello -- -- Hello-->
    <!---->
    <!------ Hello -->
    <!>
    Note that an "empty" comment tag, with just "--" characters, should
    always have a multiple of four "-" characters to be legal. (And yes, <!>
    is also a legal comment - it's the empty comment).
    Not all HTML parsers get this right. For example, "<!------> hello-->"
    is a legal comment, as you can verify with the rule above. It is a
    comment tag with two comments; the first is empty and the second one
    contains "> hello". If you try it in a browser, you will find that the
    text is displayed on screen.

    There are two possible reasons for this:

    The browser sees the ">" character and thinks the comment ends there.
    The browser sees the "-->" text and thinks the comment ends there.
    There is also the problem with the "--" sequence. Some people have a
    habit of using things like "<!-------------->" as separators in their
    source. Unfortunately, in most cases, the number of "-" characters is
    not a multiple of four. This means that a browser who tries to get it
    right will actually get it wrong here and actually hide the rest of the
    document.
    For this reason, use the following simple rule to compose valid and
    accepted comments:

    An HTML comment begins with "<!--", ends with "-->" and does not contain
    "--" or ">" anywhere in the comment.

    Your argument is with them, not me.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jan 12, 2004
    #17
  18. JCO

    Whitecrest Guest

    In article <>,
    says...
    > [snip]


    [snip snip]

    God your worse than Chip.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jan 12, 2004
    #18
  19. JCO

    Whitecrest Guest

    In article <>,
    says...
    > Typing in all this into a text-editor directly -- not auto-generating it
    > via said whizzy whizzy.


    Who generated all the back end code? Not you. You did not type a
    single line of it. If you if you are a bigger fool that you appear to
    be.

    > Yes, this is how the majority of serious applications are developed.


    Duh

    > This is certainly not analogous to using FrontPage.


    Never said it was, as a matter of fact if you READ before commenting,
    you would see I said the opposite. Hence the "get a backbone" line.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jan 12, 2004
    #19
  20. JCO

    rf Guest

    "Toby A Inkster" <> wrote in message
    news:p...
    > Whitecrest wrote:

    ===============================================

    <snip code>

    > Typing in all this into a text-editor directly -- not auto-generating it
    > via said whizzy whizzy.
    >
    > Yes, this is how the majority of serious applications are developed.
    >
    > This is certainly not analogous to using FrontPage.


    You have never created a dialog for one of your applications then?

    If so, did you use the resource editor and the associated wizards or did you
    directly edit the .rc and .rh files and create class CMyDialog : public
    CDialog yourself?

    One must understand what is in, for example, a .rc file but write one? I
    never have in the 24 years I have been writing C/C++ code. Sure, the bulk of
    the 'logic' is coded by hand but the basic framework? Nope.

    I think it's very analogous to using frontpage. Use the generator to produce
    the basic elements (say a table) and then dive into the code to add the
    tabular data that the table contains, fixing up the frontpage rubbish on the
    way.

    I find I must agree with Whitecrest on this one :)

    Cheers
    Richard.
    rf, Jan 12, 2004
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    15
    Views:
    985
    Roedy Green
    Nov 12, 2005
  2. Replies:
    0
    Views:
    1,095
  3. Monk
    Replies:
    10
    Views:
    1,438
    Michael Wojcik
    Apr 20, 2005
  4. Replies:
    1
    Views:
    345
    Jonathan Wood
    Jun 18, 2008
  5. Replies:
    4
    Views:
    575
    Dr John Stockton
    Jun 3, 2006
Loading...

Share This Page