meta name=author...

G

G Doucet

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?

All info appreciated,
Thanks,
Guy
 
R

richard

G Doucet said:
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?

All info appreciated,
Thanks,
Guy

I'd use the meta tag. Means nothing to search engines AFAIK.
And you can use as many as needed.
 
J

Jukka K. Korpela

Scripsit G Doucet:
I wanted to keep track of my html files with a version number

Do you need to put the information in the files themselves? Maybe. Hardcore
version control is tough, and often overkill.
and identify myself as being the author.

Well, then put your real name there, at the bottom. Preferably so that it is
a link to your personal home page, to help to avoid confusion with other
people with the same full name.

Even the version number might work best when written in the document content
itself. For example, at the bottom, you could have <div>This is version 2 of
the page said:
I could place this information
in a comment at the top of the html document, like: <!-- Author =
G Doucet --> <!-- Version = 2 -->

Comments considered harmful. HTML is not a programming language. Generally,
if markup "needs" a comment, it needs a rewrite. There are a few exceptions,
but consider them as rarities to be avoided.
While I'm at it, is a comment supposed to be like <!-- comment --> or
<!-- comment //--> ???

The former, of course. (To be very technical, the _comment_ is --
comment -- said:
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">

You could, and e.g. Nvu generates it automagically, but I have not seen any
program make any _use_ of such information.
What exactly does this achieve,

It basically has the role of a comment. It might be preferred to a comment,
because it's structured in a _way_. It _could_ be utilized programmatically.
and who sees this META information?

Any software that processes your document, but it will most likely ignore
it.

It isn't based on any published _specification_ either. There is no
"standard" on it even in the loosest sense of the word.

Things are different in principle if you use some published metadata
specification, such as Dublin Core. Then there's something that specifies
the format and meaning and could be used consistently. Well, more or less.
Dublin Core, for one, is actually rather vague in many ways. Dublin Core is
hardly used by any www-wide software, though it _is_ used in many local
systems and _could_ be used e.g. by search engines as well. However, much of
the Dublin Core metadata on web pages is just crap - written by people who
had no clue, or copied from other documents without changing anything, or
generated by programs from some unreliable data. So I'm not really expecting
Google and others to start paying much attention to such metadata.

Anyway, _if_ you decide to use Dublin Core, which at least gives you a
fairly systematic metadata approach with _some_ specifications, you could
use the following <head> tag to declare that:

<head profile="http://dublincore.org/documents/dcq-html/">

and the following to specify author information:

Is there one for a version number?

Not in Dublin Core; most probably in some other metadata system(s), but they
have even less relevance on the Web.

If you wish to express a version number in metadata, then you could append
it into DC.title. It wouldn't be any _structured_ part there; the DC.title
value is just a string, effectively the DC counterpart of the <title>
element content, though it could have a more detailed message, e.g.

<title>Gruntmaster 9001 product specification</title>
- -
<meta name="DC.title" value=
"Gruntmaster 9001 product specification, version 2">
 
Z

z

G said:
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>
 
A

Andy Dingley

G said:
I wanted to keep track of my html files with a version number

Then set up a real version control system on a server alongside your
development desktop. I suggest installing Subversion (free) as about
the best choice. It's not the simplest thing in the world, but it's
time well spent. Once you have one, you'll wonder how you ever managed
without.
and identify myself as being the author.

Embed this information in a <meta> element

<meta> have a poor press these days, as the fact they're easily spammed
led to them being ignored by search engines, which led (erroneously) to
them being written off as worthless. They're certainly not worthless,
they just need to prove they're trustworthy before you make use of them
-- obviously the ones on your own site can be trusted by you at least.

A <meta> element is far more easily located, identified and parsed than
an opaque string of text in a comment.

It's unlikely that author name alone really adds much. If you use
metadata at all, it's usual to use a fair bit of it, Try reading the
resources from http://creativecommons.org and http://purl.org/dc for a
lot more useful background here.
 
D

David Dorward

z said:
<script type="text/javascript">
<!--
//-->
</script>

Don't do that! Putting an HTML comment inside a <script> element is
pointless in HTML (nobody uses the browsers it protects any more), and
harmful in XHTML (where it comments the script itself out).
 
G

G Doucet

Andy Dingley said:
Then set up a real version control system on a server alongside your
development desktop. I suggest installing Subversion (free) as about
the best choice. It's not the simplest thing in the world, but it's
time well spent. Once you have one, you'll wonder how you ever managed
without.

I'm sorry for not providing more info on my first post... This is an internal site, not available to the public. Also, I am not
one of the system administrators - I am just developing a (relatively small) reference site on my public folder.
....
It's true that people in the office could access my site directly, but for the most part, people working on the road will be able to
copy the site to their laptops.

Anyway, it's not that important since I do have a "Readme" link on the homepage where I indicate that I'm the author, but I do have
several other htm files which I would like to stamp with a version or date. I was going to put it in a comment, but now I think I
will put it in a META tag.

Thanks for all,
Guy
 
Z

z

David said:
Don't do that! Putting an HTML comment inside a <script> element is
pointless in HTML (nobody uses the browsers it protects any more), and
harmful in XHTML (where it comments the script itself out).

I guess it is a bit strange to protect old browsers from JavaScript these
days.
 
D

David Dorward

z said:
I guess it is a bit strange to protect old browsers from JavaScript these
days.

Well, since most of the ones it protects don't, IIRC, support enough modern
HTTP to fetch most pages ....
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top