Specifying the Author Name, Setting Charactor Encoding, Style Sheet Language

Specifying the Author Name:

You can set the name of the author of the document using a value of author for the http-equiv attribute and then using the author’s name as the value of the content attribute, like so:

< meta http-equiv=”Author” content=”Author Name” />

Setting the Character Encoding:

Character encodings indicate the character encoding that was used to store the characters within a file. You can specify the encoding used in a document with a < meta > tag whose http-equiv attribute has a value of Content-Type. The value of the content attribute should then be the character encoding used to save the document; for example:

Here you can see that the document was written using the ISO-8859-1 encoding.

Setting a Default Style Sheet Language:

You can specify the type of style sheet language you will be using in a document by setting the http-equiv attribute to have a value of content-style-type, and specifying the MIME type of style sheet language in the content attribute.

< meta http-equiv=”content-style-type” content=”text/css” />

When style sheet rules are inside a < style > element, the type attribute indicates the style sheet language used inside that element; but when you have inline style sheet rules using the style attribute on an element, there is no explicit indication of the language used. Therefore, setting the default to CSS removes any doubt.

While CSS is the most popular language for styling HTML and XHTML documents, some applications support other languages such as XSLT and DSSSL (although these languages are rarely used with web pages, so it would be extremely rare for you to see the content-style-type used in web pages).

Setting a Default Scripting Language:

If you are going to use scripts throughout your page, you can use the < meta > element to indicate the language your scripts are in. While you should still be using the type attribute on any < script > element, you can often use scripts in event handlers, and setting this < meta > tag indicates the language used in those attributes.

< meta http-equiv=”content-script-type” content=”text/JavaScript” />

The scheme Attribute:

The scheme attribute can be used to specify a scheme or format for a property value. For example, if you are working with dates, you can write them in several ways. In the U.S., the date format is written mm-dd-yyyy, whereas in Europe it is written dd-mm-yyyy. So, you might use the scheme attribute to indicate a date format. In the U.S., you could use the following:

< meta scheme=”usa” name=”date” content=”04-16-1975” />

In Europe, you might use the following:

The use of the scheme attribute does assume that the processing application understands the value of the scheme attribute and name attribute—and given that the mainstream browsers would not understand this, it would fall upon either a script or a custom application to interpret the use of this element.