Posted by z on 10/02/06 07:50
G Doucet wrote:
> I wanted to keep track of my html files with a version number and identify
> myself as being the author. I could place this information in a comment at
> the top of the html document, like:
> <!-- Author = G Doucet -->
> <!-- Version = 2 -->
> While I'm at it, is a comment supposed to be like <!-- comment --> or <!--
> comment //--> ???
>
> Now I'm not very familiar with the meta tag but I have noticed that you
> could do something like this too:
> <META name="Author" content="G Doucet">
> What exactly does this achieve, and who sees this META information? Is
> there one for a version number?
Meta tag is probably better, but it shouldn't matter.
An HTML comment is done like this:
<!-- comment goes here -->
The second version is only for commenting out JavaScript because the double
slashes (//) mark a comment in JavaScript -- to keep the JavaScript from
reading the close of the HTML comment:
<script type="text/javascript">
<!--
// this is a JavaScript comment
// the next line has a double slash to keep it from causing a JavaScript
error, and a --> to close the HTML comment for very old browsers
//-->
</script>
[Back to original message]
|