Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comment Lines in HTML

Status
Not open for further replies.

dance

Technical User
Nov 6, 2002
142
US
Front Page 2002 My understanding is that comment lines are by default in grey and that comment lines begin with <!. I discovered by accident that when I changed words beginning with <! that were also in the color grey, the page changed. These line WERE NOT comments. What gives? How am I to know what is comment and what is not? How am I to make comments in the code?
 
From the HTML4.01 specification at
3.2.4 Comments

HTML comments have the following syntax:

<!-- this is a comment -->
<!-- and so is this one,
which occupies more than one line -->


Mike Krausnick
Dublin, California
 
The following is in my page. It has exactly the symbols you describe, but when I changed [subject=&quot;employment interest&quot;] to [subject=&quot;From Web Site&quot;] (without the []) the subject line changed in the e-mail. How do you account for that?
Thanks!

<!--webbot bot=&quot;SaveResults&quot; s-email-format=&quot;TEXT/PRE&quot; s-email-address=&quot;sandrast@wheelers.com&quot; b-email-label-fields=&quot;TRUE&quot; b-email-subject-from-field=&quot;FALSE&quot; s-email-subject=&quot;From Web Site&quot; s-builtin-fields u-file=&quot;_private/contact_req.txt&quot; s-format startspan -->
 
I guess I misunderstood your question. I was responding to the fact that the comment indicator must include the two dashes, which your first post didn't have.

I'm not at all an FP webbot expert, but let's see what we've got: You modified the HTML directly by changing the value of the &quot;s-email-subject&quot; attribute from &quot;employment interest&quot; to &quot;From Web Site&quot;, right? I must be missing something - it seems to me that if you change the subject line attribute, you would want the resulting email's subject line to change. What is the unexpected behavior? How does the published page differ from what you wanted? In what browser? Suggestion: Publish both pages and post back with the links so we can see what the problem is.

Mike Krausnick
Dublin, California
 
I really didn't intend to include the second paragraph of the code. I thought I had deleted that. My last message should have ended with &quot;Thanks.&quot; My page is doing now exactly what I want it to. My question is why is code in grey and preceded by <!-- when it is NOT a comment, but controlling code. How do we determine what is a comment and what is code in Front Page?
 
All web development packages put package-specific and extended commands within comment delimiters, because those commands are not within the official defined HTML language specification. Web servers that support those commands will recognize and execute them, rendering the page as you intend, while servers that don't will simply ignore the commands and treat them as comments. Likewise with browsers.

It's a compatibility thing. It's done so as to not cause the end user to see an error when the server or browser doesn't support a feature of your development package.

Mike Krausnick
Dublin, California
 
Thank you! That makes sense, and I am glad to understand it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top