Would anyone mind explaining or linking me to articles (preferably explaining) that explain what the meta tag is, what it does, how to write it, etc?
Thanks lots.
~TehYoyo
| SitePoint Sponsor |
Would anyone mind explaining or linking me to articles (preferably explaining) that explain what the meta tag is, what it does, how to write it, etc?
Thanks lots.
~TehYoyo

When in doubt, go to the W3C.
Twitter-@Ryan_Reese09
http://www.ryanreese.us -Always looking for web design/development work




Basically, the meta tag gives hints about the content. Think of meta tag like a spokesman for your page.


It's for meta data relating to the document either to emulate the use of the HTTP response header, or to embed additional metadata within the HTML document such as; keywords, author or other content.
};-) http://www.xhtmlcoder.com/
Thinking Web: Voices of the Community
> March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

A better source of information is, of course, Sitepoint Reference, which is far more readable and understandable than W3C.
I love Sitepoint! And...oh, they have forums? I'll have to join those! :tongue:
I'm more interested in all possible syntaxes.
~TehYoyo
Edit - just browsed the w3 page on it. Mind telling me if I got it down? I'm looking for both correct syntax and all possible metadata tags.
HTML5 code for a site on motorbikes:
Yah?Code:<meta name=application-name content="Pick a motorbike" /> <!--If it's not an actual "app" do I need this?--> <meta name=author content="TehYoyo" /> <meta name="keywords" content="motorbikes, highway, awesome" />

Whatever you like! As the article I linked to says, you can create whatever metas you want, although there's not a lot of point in creating them unless they're going to be used in some way, so unless you're writing your own application that will make use of them, you're best off sticking to the ones that are already established.
The basic ones are http-equiv, description [whisper]and keywords[/whisper]. Dublin Core produced a list of "standard" metas that authors could use - they take the format <meta name="dc.title" content="(insert title here)">. Many of these replicate other tags such as <title> or various <link> formats, and they've never really taken off.

Yup. That's why they're "meta", they're tags about information. Of course, what happens once you've created them is anybody's guess.
There's a few more that are specific to Google as well.
It's a way of sending character encoding information if it isn't set on the server. Like this:Also, what exactly is http-equiv?
Code:<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
Keywords is largely a waste of time. Description is absolutely vital. I don't see any point in dc.author when I haven't yet seen any general application of those properties.So probably I'd use:
- Description
- Author
- Keywords
Another method for identifying authorship is to use rel="author" on <a> links.
Is that better?My eyes!!!!! My eyes!!!! I used to respect you, Steve...![]()
So it'd be most common/smart to use those?
Isn't that why a <meta charset="utf-8"> Does?It's a way of sending character encoding information if it isn't set on the server. Like this:
Code:<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
Off Topic:
Huh? Can't understand you, soz.Is that better?
Right. That's what I was mostly looking for. Would that be acceptable?
Off Topic:
Ha, that didn't work!
What! Works for me! You liar! (Or maybe you just don't have MS Word - I figured that w/ your use of French Script, it just worked like Font Family - if you have it, it shows.

Twitter-@Ryan_Reese09
http://www.ryanreese.us -Always looking for web design/development work
Title, description and keyword etc are the 3 basic meta tags located in <head></head> section of a page known as meta tags. There are many available. Actually meta tag describe a page to search engine like google. When we search something with key phrase in search engines it shows title and description in search result of a website or web page.
Agh, the browser wars are restarting! Let me plump down for Opera, and be a proud member of the 2% (while staunchly standing up with the 99% here in the States, but that's another topic entirely). But I'm happy with Chrome or FF as well, so no badmouthing of anything besides IE from me.
Agreed. I toss 'em into the sites I do, but if I spend more than five minutes on them, that's too long. As Stevie says, descriptions are an entirely different issue. That's what the search engines display in their summaries of your site, so write good ones.
There's a LOT of misinformation about what META tags are and what purpose they serve -- when they exist to provide information that is outside the scope of HTML.
That's right, they are there to provide information to user agents that HTML cannot. There IS NO ACTUAL W3C Specification for what goes into "name" or "content"!!! It exists to allow information outside the scope of HTML to be passed. While they do provide examples of using it, none of those are actually written in stone in the HTML specificaion.
While there are many common values, well... let's go down the list of ones that matter.
http-equiv -- this attribute literally means whatever you put in 'content' should be treated the same as if it was in the http header. For example:
Is supposed (some UA's skip this) to be the same as sayingCode:<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Content-Type: text/html; charset=utf-8
In the HTTP response headers. Other values you could pass include 'vary', 'content-encoding', 'cache-control', and 'expires'. The actually HTTP response headers are supposed to trump this, so in theory it's only useful for passing values that are missing. This is why including the above meta is common and generally worth NOT skipping, since it is what in local testing will be used to decode the document. (otherwise locally it will default to iso 8859-1 in most UA's)... just part of why I dislike the new HTML 5 lip service.
name -- there's a whole plethora of name type meta-data that NOTHING pays ANY attention to. Author, generated, generator -- nobody gives a flying purple fish about those. They do nothing but waste bandwidth for information NOTHING actually uses!
There are generally only three NAME attribute values you actually need to give damned about -- and all three of them are for search engines.
name="keywords" -- a list of words on the current page that are important. This is WORDS -- not phrases, not sentences, WORDS. keywords. They occasional unique two-word non-compound compound (like a proper name) is acceptable, stuffing it with every possible combination is not. People think this meta is ignored -- it isn't ignored (in my own testing) if you *SHOCK* use it properly and have 100% relevance to the page it's on. You should keep it to six to eight words, those words should appear somewhere inside <body> at LEAST once, and be separated with commas. Yes, commas. Not semi-colons, not vertical breaks, COMMAS. Vary from this formula, and you are just wasting bandwidth.
for example:
"paku paku" being the proper name of a program is acceptable despite being two words.Code:<meta name="keywords" content="pascal,programming,openGL,sdl,paku paku" />
You'll often see people doing idiotic nonsense like this:
Which if it wasn't ignored (it is) would be redundant to just saying:Code:<meta name="keywords" content="pascal,pascal programming, opengl, opengl programming, sdl, sdl programming, game programming, game development, game sales" />
content="pascal,opengl,sdl,game,programming,development,sales"
It's very easy to use properly, just think of it like a word jumble... six to eight words that actually on the page as text content you'd like to rank just a hair higher for. That's it, that's all it's for.
name="description" -- A short natural language text to be shown on your SERP. This is NOT for SEO in terms of ranking, it's for SEO in terms of making your SERP look more attractive. SERP == Search Engine Results Page -- the page on the search engine your site appears, specifically the listing itself. For some reason some of the SEO snake oil re-re's think SERP means just where you are listed, and not what that listing actually looks like... This of course is fiction, parrotting other snake oil doctors, or just flat out ignorance.
for example, if you had:
Your SERP listing would be something like this:Code:<title> My Site </title> <meta name="description" content="Here in my site, I feel safest of all. I can lock all my ports. The only way to live, is in sites." />
My Site
Here in my site, I feel safest of all. I can lock all my
ports. The only way to live, is in sites.
Again, a very simple meta, that people abuse endlessly and uselessly failing to grasp the entire point of using it in the first place!
name="robots" -- provides specific instructions for search engines. Single words you can put into the content attribute separated by commas.
'noindex' -- do not index this page for searches. Pretty simple, don't list this page in results. I have the robots.txt equivalent to this in my /for_others directory so all those rewrites I've done for people don't steal their link/search mojo.
'noodp' -- says to use what's on this page for the SERP listing instead of what's listed in the 'open directory project'. I had a problem a while back with a site where someone made a ODP listing for one of my pages, that completely screwed up my results. (said dipshit was arguing my sites didn't index right, then intentionally sabotaged me with ODP -- real class!) Done properly the "open directory project' can make your SERP listing look really nice, but it's redundant and is just one more thing to have to edit.
'noydir' -- yahoo has their own goofy 'content directory' thing, adding this tells them to go shtup themselves.
So, for example:
Would tell the robots not use use ODP and Y! not to use their stupid extra crap.Code:<meta name="robots" content="noodp,noydir" />
-----------------------------------------------
Bottom line, that's it... two different meta types, three different values for name attribute. ANYTHING else people say to include or tend to use for META are just bandwidth wasting BS... They are very simple to implement and anyone who tells you to play stupid games with the values, use different delimiters or more complex forms are packing you so full of sand you could change your name to Sahara.
Last edited by Stevie D; Apr 7, 2012 at 02:31. Reason: Code tag fixed
Can I create a meta tag for people who browse my page? For instance, one thing that I hate as a student trying to make a bibliography is finding the last-edit date. Usually, I'll look in source for a last edited comment or such. Could I (although it's irrelevant to SEs) possibly make my own meta tag like:
I could put it on the page itself, but would it be better to do it any one way?Code:<meta name="LastEdit" content="4/7/2012">
~TehYoyo



You can use <meta name="date" content="2012-03-29T17:29:27+0100" />, although I'm pretty sure that won't validate if you use an HTML5 doctype. If I include that meta, my editor (Bluefish) automatically updates it every time I save the file. I don't know what other editors do.
If you're a bear made of mohair, ponder on the nature of a mo.
That's what it's for... not just for search engines or the W3C -- you want to make up your own values for your own internal use, go for it. That's the real advantage to the element is you can add your own values willy-nilly, and so long as nobody else tries to make the same 'name', you're in the clear.
Bookmarks