Re: What does this mean

Discussion in 'HTML' started by Jukka K. Korpela, Oct 1, 2012.

  1. 2012-10-01 19:09, Bint wrote:

    > Comments are indicated by <!-- --->, right?


    No, the common comment syntax is <!-- --> (your example has one "-" too
    much, turning the construct to an invalid comment declaration).

    > But sometimes you see stuff inside commments that seems to also *do*
    > something. When or why is this?


    Mostly because they are not comments and not HTML at all but in some
    data format from which HTML documents are generated. Using syntax that
    matches HTML comments is somewhat odd, but part of the motivation is
    that if such data gets accidentally transmitted to a browser as an HTML
    document, the construct gets ignored.

    > For example, these two lines of code, what does that %movie signify? It is
    > not just a comment, is it? I tried taking it out and the page changed.
    >
    > <!--%movie-->
    > <div id="div_<!--$movie['uid']-->" class="column"
    > uid="<!--$movie['uid']-->">


    In terms of HTML, they are comments. But depending on server-side
    software that processes data before sending an HTML document, it may
    cause many things.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Oct 1, 2012
    #1
    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. Pratip Mukherjee

    Help: what does this VHDL code mean?

    Pratip Mukherjee, Jun 22, 2005, in forum: VHDL
    Replies:
    16
    Views:
    1,257
    Kim Enkovaara
    Jun 27, 2005
  2. methi
    Replies:
    1
    Views:
    821
    info_
    Jun 23, 2005
  3. Li Ma
    Replies:
    1
    Views:
    2,262
    Roedy Green
    Mar 9, 2009
  4. Rahul
    Replies:
    4
    Views:
    546
    Robert Kern
    Apr 7, 2009
  5. C Barrington-Leigh
    Replies:
    1
    Views:
    1,177
    Tim Leslie
    Sep 10, 2010
Loading...

Share This Page