banner
Welcome to HTML.co.uk, the number one resource for all news, information, and happenings regarding HTML.

Updates: HTML.co.uk has just been relaunched. Subscribe to our RSS Feed to stay on top of HTML news and techniques.
May
8th

General Information regarding Meta Elements: Part 1

Author: Editor | Files under HTML Tutorials

You can notate various types of useful information for web servers, web browsers and search engines using Meta elements. Meta elements can include information regarding the file’s author and content. They can also include HTTP orders, such as automatically forwarding to another address, for example.

Meta elements are not designed for personal commentary on the source text of a HTML file. Commentaries already exist for such information.

Since the HTML standard version 4.0, no one writes concrete Meta elements, instead they only define the fundamental construction of a Meta element. The W3 consortium is working on a language entitled Resource Description Framework, for standardising Meta elements. More information regarding the Resource Description Framework is found on the consortium’s website.

Be sure to note a Meta tag in the HTML file’s header for every Meta element. It is no problem whatsoever to notate multiple Meta tags.

Examples:

<head>
<meta name=“author” content=“John Smith”>
<meta http-equiv=“expires” content=“Sat, 01 Dec 2007 00:00:00 GMT”>
</head>

Explanation:

A Meta element exists in a standalone tag named Meta. Every Meta tag has two attributes. The attribute is either the name or http-equiv, while the second is always content. The two attributes produce typical configuration data of the type “attribute=value”. In the above example, the name was given the attribute “author”, while the content was given the value “John Smith”. In the second Meta example, the attribute named expires was given the value Sat, 01 Dec 2007 00:00:00 GMT. However, in the second example the attribute was defined with a http-equiv.

Attributes that are defined with name, are directed primarily towards reading client programmes, as in web browsers, but also towards search engine robots, which scan websites to feed their search engine data base.

On the other hand, attributes that are defined with http-equiv, were originally thought out for web servers. The idea behind it is when the web server receives the request from a web browser to transfer a HTML file, the web server first reads the Meta tags and information defined with http-equiv, before sending the file to the browser. This makes it possible for the file author to influence the communication between the web server and web browser. However, instructions of this type rarely achieve their desired effect, because most web servers do not read the data before sending the file to the browser. So it is then the web browser’s responsibility to interpret Meta instructions, such as the HTTP header.

Take Note:

Unfortunately, many people misuse Meta elements. Because most Meta elements have no apparent effect on the screen and are also involved with search engines, there are many ambitious people who feel they can somehow tweak with the Meta elements to get their site at the top of a search engine’s search results. After website developers used paradoxical and misleading Meta elements, the major search engines decided to no longer give any special attention to Meta elements. They instead place value on content and calculate the relevance of the site in terms of how many foreign sites link to it. Therefore, a homepage will not become successful through misleading Meta elements. A clean homepage includes the reasonable use of Meta elements.

If you work in the XHTML standard, then you must characterise the Meta elements as content less. To do so, notate them in a standalone tag in this form: <meta name=“Attribute” content=“Value” />.

Description, Author, Keywords, and Date

The Meta elements described here are the most prevalent, and they are read by nearly every search engine. Today’s popular search engines even still take them into consideration to a certain degree. The information is still important, especially for internal search programmes that need to rely on the accuracy of Meta elements.

You can notate your authorship, briefly describe the content, specify keywords and the date of publication. The short description, especially, is displayed by many search engines in the search results. It is therefore wise to include these Meta elements in all relevant HTML files and produce them just as carefully as you would the full bodied text to be displayed in the web browser.

An Example:

<head>
<meta name=“description” content=“this description should appear to a user when finding this website as a search result.”>
<meta name=“author” content=“Jim Jones”>
<meta name=“keywords” content=“HTML, meta information, search engines, HTTP protocol”>
< name=“date” content=“2008-5-8”>
</head>

Explanation:

With <meta name=“description” content=“description text”>, you determine the description text.

With <meta name=“author” content=“Author Name”>, you show who the HTML file author is.

With <meta name=“keywords” content=“list of keywords”, you determine the file’s tags or keywords for a search engine. A user, who searches using the same keywords as the ones specified in the Meta element, should have this website appear as a preferred result. Separate the keywords with a comma. A keyword can consist of two separate words or one word. However, entire sentences, or even half sentences, do not belong here, because that is what the descriptive text you notate using the name= “description” is for.

With < name=“date” content=“the date”>, you enter when the file was published. The time entry should follow a specific formula. In this case it begins with the year, 2008, followed by the month, May, and finally the date, the 8th. We have still only scratched the surface of Meta elements, but in the interest of organisation, we have decided to separate the tutorial of Meta elements into multiple parts. The next section follows after this one.

Post a Comment