SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 30

Thread: Meta Tag

  1. #1
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)

    Meta Tag

    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

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,746
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    When in doubt, go to the W3C .
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  3. #3
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by RyanReese View Post
    When in doubt, go to the W3C .
    And come away hopelessly confused

    I'd like to get the basics and then delve into the documentation later.

    ~TehYoyo

  4. #4
    Non-Member
    Join Date
    Feb 2012
    Posts
    892
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Basically, the meta tag gives hints about the content. Think of meta tag like a spokesman for your page.

  5. #5
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    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.

  6. #6
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    A better source of information is, of course, Sitepoint Reference, which is far more readable and understandable than W3C.

  7. #7
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stevie D View Post
    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:
    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" />
    Yah?

  8. #8
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    I love Sitepoint! And...oh, they have forums? I'll have to join those! :tongue:

    I'm more interested in all possible syntaxes.
    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.

  9. #9
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stevie D View Post
    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.
    Let me get this straight.....you can create your own meta tags?

    Also, what exactly is http-equiv?

    So probably I'd use:

    • Description
    • Author
    • Keywords


    (insert title here)
    My eyes!!!!! My eyes!!!! I used to respect you, Steve...

  10. #10
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    Let me get this straight.....you can create your own meta tags?
    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.


    Also, what exactly is http-equiv?
    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">

    So probably I'd use:

    • Description
    • Author
    • Keywords
    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.

    Another method for identifying authorship is to use rel="author" on <a> links.


    My eyes!!!!! My eyes!!!! I used to respect you, Steve...
    Is that better?

  11. #11
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stevie D View Post
    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.
    So it'd be most common/smart to use those?

    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">
    Isn't that why a <meta charset="utf-8"> Does?


    Off Topic:

    Is that better?
    Huh? Can't understand you, soz.

  12. #12
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    Isn't that why a <meta charset="utf-8"> Does?
    As far as I know, that's only allowed in HTML5, not earlier versions.

    Off Topic:

    [font=Wingdings]
    Ha, that didn't work!

  13. #13
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stevie D View Post
    As far as I know, that's only allowed in HTML5, not earlier versions.
    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.

  14. #14
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Off Topic:

    Quote Originally Posted by TehYoyo View Post
    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.
    Ah - one of the features of Opera is that it refuses to display text in a non-alphanumeric font. Sometimes a blessing, sometimes a curse. I'd forgotten that and assumed it was SPF that was trying to thwart you.

  15. #15
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stevie D View Post
    Off Topic:


    Ah - one of the features of Opera is that it refuses to display text in a non-alphanumeric font. Sometimes a blessing, sometimes a curse. I'd forgotten that and assumed it was SPF that was trying to thwart you.
    Darn that Opera...no wonder it has 2 percent! Chrome Fanboys unite!

    ~TehYoyo

  16. #16
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,746
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    Darn that Opera...no wonder it has 2 percent! Chrome Fanboys unite!

    ~TehYoyo
    You do realize that's not the reason it has 2% correct?
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  17. #17
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by RyanReese View Post
    You do realize that's not the reason it has 2% correct?
    Well, yes. Of course. I was just kidding

    ~TehYoyo

  18. #18
    SitePoint Enthusiast
    Join Date
    Mar 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  19. #19
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    Well, yes. Of course. I was just kidding
    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.

    Quote Originally Posted by Stevie D View Post
    Keywords is largely a waste of time.
    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.

  20. #20
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Off Topic:

    Quote Originally Posted by Black Max View Post
    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).
    Oooooh. Let's not venture into politics (of course), but I'm not a fan of that movement.

    ~TehYoyo

  21. #21
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    Off Topic:

    Oooooh. Let's not venture into politics (of course), but I'm not a fan of that movement. ~TehYoyo
    Not a problem, we generally don't do politics in these forums. We are officially agreeing to disagree and turning to different topics.

  22. #22
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    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:

    Code:
    <meta
    	http-equiv="Content-Type"
    	content="text/html; charset=utf-8"
    />
    Is supposed (some UA's skip this) to be the same as saying

    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:
    Code:
    <meta
    	name="keywords"
    	content="pascal,programming,openGL,sdl,paku paku"
    />
    "paku paku" being the proper name of a program is acceptable despite being two words.

    You'll often see people doing idiotic nonsense like this:
    Code:
    <meta
    	name="keywords"
    	content="pascal,pascal programming, opengl, opengl programming, sdl, sdl programming, game programming, game development, game sales"
    />
    Which if it wasn't ignored (it is) would be redundant to just saying:

    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:

    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."
    />
    Your SERP listing would be something like this:

    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:

    Code:
    <meta
    	name="robots"
    	content="noodp,noydir"
    />
    Would tell the robots not use use ODP and Y! not to use their stupid extra crap.

    -----------------------------------------------

    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

  23. #23
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    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:

    Code:
    <meta name="LastEdit" content="4/7/2012">
    I could put it on the page itself, but would it be better to do it any one way?

    ~TehYoyo

  24. #24
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,408
    Mentioned
    273 Post(s)
    Tagged
    5 Thread(s)
    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.

  25. #25
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    Could I (although it's irrelevant to SEs) possibly make my own meta tag
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •