Forum Moderators: phranque

Message Too Old, No Replies

reformatting the meta tags

are all these really needed?

         

Katie_Venra

6:52 pm on Oct 25, 2005 (gmt 0)

10+ Year Member



So my own site has only used 2 meta's, description and keywords...thats it...

Someone told me though that it would be a better idea to use these...

<META name="Abstract" content="">
<META name="Author" content="">
<META name="Description" content="">
<META name="Keywords" content="">

Whats "Abstract" and is the abstract and authors tags needed?

encyclo

12:37 am on Oct 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the meta tags are for the search engines, then no, you don't need more than the description and keywords tags - and even those are not particularly important compared to other on-page factors. You can use the Dublin Core [dublincore.org] meta data standards if you want to add other meta tags, but their importance will be very limited.

Katie_Venra

5:23 pm on Oct 26, 2005 (gmt 0)

10+ Year Member



Ahhhh thanks encyclo :)

g1smd

1:34 pm on Oct 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Your document should begin with a !DOCTYPE (this tells the browser what sort of HTML is in the file) followed by the <html> and <head> tags:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

For your page to actually be valid you MUST declare the character encoding (lets the browser know whether to use A to Z letters (latin), or Chinese, Japanese, Thai, or Arabic script, or some other character set) used for the page, with something like:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

There are also other schemes such as UTF-8 and many others.

It is also a good idea to declare what human language the page is in, using:

<meta http-equiv="Content-Language" content="EN-GB">

The language and country codes come from ISO 4217 and ISO 3166. This is useful for online translation tools as well. Change the "en" and "gb" to whatever language and country you need.

You need a <title> element for the page:

<title> Your Title Here </title>

This is displayed at the top of the browser window, and stored as the name of the bookmark if someone bookmarks the page URL in their browser. Most importantly, it is the <title> tag that is indexed and displayed by search engines in the search results page (SERPs).

You need the meta description tag, as this is very important for search engines, and it is useful but not vital to have a meta keywords tag:

<meta name="Description" content=" Your Description Here. ">
<meta name="Keywords" content=" your, keyword, list, here ">

Most search engines do obey the robots meta tag. The default robots action is index, follow (index the page, follow all outbound links) so if you want something else (3 possibilities) then add the robots tag to the page in question. If you want to exclude whole directories then use the robots.txt file for this instead of marking every HTML file with the tag.

<meta name="robots" content="noindex,follow">

The last parts of your header should have your links to external style sheets and external javascript files:

Use this if the stylesheet is for all browsers:

<link type="text/css" rel="stylesheet" src="/path/file.css">

Use this for style sheet that you want to hide from older browsers, as older browsers often crash on seeing CSS:

<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"> @import url(/path/file.css); </style>

Use this for the javascript:

<script type="text/javascript" language="javascript" src="/path/file.js"></script>

End the header with this:

</head>
<body>

and then continue with the body page code.

It is as simple as that.


Code within the page:

I use: <a href="somepage.html" title="some text here"></a> for links.

I use <img src="somefile.png" alt="some text"> for images.

Headings are done with <hx></hx> tags, properly used from <h1></h1> downwards.

Katie_Venra

2:20 am on Nov 3, 2005 (gmt 0)

10+ Year Member



Thanks G1, already have all of the required W3C stuff at the top end of the site, link is in my profile if you want to check out the coding :)

g1smd

7:36 pm on Nov 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Run the pages through [validator.w3.org...] - they are almost valid HTML code.

You use CSS so I don't know why there are still some <font> tags scattered through the pages. Get the styling information out into the CSS file.

You also have blank heading tags like <h5></5> too. Utilise them for headings!

You don't need to write tags like <br /> because you are only using HTML. The trailing / is only required for XHTML code.

Don't use <br><br><br> for spacing content out. Put the content inside logical blocks like <p> ... </p> and then use CSS to set the size of the top and bottom margins instead.

Don't use inline CSS styles - get all the CSS out into the external stylesheet file.

The HTML code can be condensed a lot without any loss of functionality.

Hope that helps!