views:

60

answers:

3

I'm creating web pages (html) every day, but I would like the pages to have a comment in the source code.

In php you can set something like this

/**
* this is the info on the page
* @param x
* @author me
*/

Is there a similar standard that is used to set comments in html pages? I would like to specify at least these options:

  • information on the page
  • author
  • copyright
  • datetime

EDIT: I know how comments are written in html, I only wonder if there is a standard used for this kind of information?

A: 

Comments are set as below is html. There is no standard for author info, etc.

<!-- #comments goes here -->

You could have PHP set this via scripting if you wanted to automate it.

Michael Gattuso
There is a standard, there's a meta tag you should use to semantically describe the author and copyright details of a page.
Sohnee
Thank you for the correction about the standards. I was thinking more about standards within the comment block itself.
Michael Gattuso
+2  A: 

Meta Tags. That will let you supply the appropriate information. See http://www.submitcorner.com/Guide/Meta/author.shtml for an example of the author. Whilst not a comment it will convey the information, and is machine readable (if you're happy for the information to be public).

slashnick
A: 

You can have some extra text in the comment tag <!-- comments --> which will be display when viewing source code of the html.

You can have some extra information in the head tag <head> ... </head> which will be display when viewing source code of the html and properties of the page.

For meta data, please visit w3c specification.

enguerran