How add meta property="og:locale" content="?" - html

I have seen several different articles, and I want to know, to be sure what is right,
How add meta og:locale example: en_US or en-US Which is correct? or is the same?
on my website I have add it like this
<meta property="og:locale" content="en_US"/>

According to their documentation here http://ogp.me/,
og:locale - The locale these tags are marked up in. Of the format language_TERRITORY. Default is en_US.
The accepted format is en_US, so your meta property tag is in the correct format. If you want to add an alternative language, you can do so with
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="es_ES" />
As stated in their website.

Related

Are multiple <meta> tags required or do I only need one?

I'm pretty new to coding and I wanted to try out creating a website on my own. I'm just not too sure about how to use meta tags. Can I put all the attributes I want to use in one tag, are multiple required or does the amount depend on which attributes I plan to use?
I've read a little of the documentation here: https://www.w3.org/TR/2014/REC-html5-20141028/document-metadata.html#the-meta-element, and a couple questions on this site but I still don't have a clear understanding of how many to use.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Home</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="standard-theme.css" />
</head>
I just want a clear understanding of how many meta tags should be used in my document. Any help is greatly appreciated.
Meta tags describe the meta of your page
It tells the browser, screen readers and search engines how to interpret your page, what kind of information to expect and how it should work on mobile phones, among other things.
Mozilla has some good documentation about the <meta /> tag. Have a lookt at the possible properties and their values to get a better understanding.
Some interesting things to note:
Multiple meta tags can be used.
The charset property declares the character encoding of the page
The name property can be used together with the content property.
Each meta tag describes a separate meta property of the page. Most meta properties are identified by the name=<propertyName> part, which you can NOT pass multiple times.
Common examples:
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="This page contains information about X and Y" />
<meta> tag gives the specific information about the html document. You have to use multiple tags describe each metadata you use in the document depending on the requirement.
ex: page description, keywords, author of the document, last modified, etc
<meta> has multiple uses and you can find more information on W3Schools here

Putting OGP tags, it occurs 'The 'og:type' property is required, but not present.'

I'm putting some OGP tags on my website below.
http://en.come-to.tokyo/
Every time I check on Facebook Debugger here, same error come up.
"The 'og:type' property is required, but not present."
Though og:type is there, how can I do for it?
Thanks in advance.
You need to fix your HTML errors, the following lines include a semicolon that should not be there:
<meta property="og:url" content="http://en.come-to.tokyo"; />
<meta property="og:image" content="http://en.come-to.tokyo/images/logo-movie-bg.png"; />
Correct:
<meta property="og:url" content="http://en.come-to.tokyo" />
<meta property="og:image" content="http://en.come-to.tokyo/images/logo-movie-bg.png" />
You should also consider using a larger image for og:image, check out the docs for the specifications: https://developers.facebook.com/docs/sharing/best-practices#images

Facebook Linter showing og:type as webpage when it is defined as company

I have a company web page that I've added a Facebook 'Like' button too. I have defined the namespace for FB and OG and added in all my Metatags - my code is below. URL is www.akascia.com.
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="og:title" content="Akascia" />
<meta property="og:type" content="company" />
<meta property="og:url" content="http://www.akascia.com" />
<meta property="og:image" content="http://www.akascia.com/images/akascia_fb_logo.png" />
<meta property="og:site_name" content="Executive search, purely done by Akascia" />
<meta property="fb:admins" content="********" />
<meta property="fb:page_id" content="**********" />
<meta property="og:email" content="admin#akascia.com"/>
<meta property="og:phone_number" content="+44 2070 787 665"/>
However, when I run the site through the Facebook linter, I get the following results:
Warnings that should be fixed
Extraneous Property: Objects of this type do not allow properties named fb:page_id.
Extraneous Property: Objects of this type do not allow properties named og:email.
Extraneous Property: Objects of this type do not allow properties named og:phone_number.
Open Graph Object Properties
fb:admins Array of length 1
⍾ ********
og:url http://www.akascia.com/
og:type website
og:title Akascia
og:image
og:site_name Executive search, purely done by Akascia
og:updated_time 1320835017
Raw Open Graph Document Information
Canonical URL http://www.akascia.com/
Meta Tag <meta property="og:title" content="Akascia" />
Meta Tag <meta property="og:type" content="company" />
Meta Tag <meta property="og:url" content="http://www.akascia.com" />
Meta Tag <meta property="og:image" content="http://www.akascia.com/images/akascia_fb_logo.png" />
Meta Tag <meta property="og:site_name" content="Executive search, purely done by Akascia" />
Meta Tag <meta property="fb:admins" content="731575475" />
Meta Tag <meta property="fb:page_id" content="114216411121" />
Meta Tag <meta property="og:email" content="admin#akascia.com" />
Meta Tag <meta property="og:phone_number" content="+44 2070 787 665" />
So it seems that it thinks the webpage should have the og:type:webpage, even though I'm declaring as a 'company' and in the raw data it's showing it's scraped it as 'company' too. Hence it's giving the warnings for the telephone numbers etc.
The 'Like' button seems to work but I'm not 100% sure it's right. So I'm a bit confused as to why this is happening.
The current list of builtin object types is listed here: http://developers.facebook.com/docs/beta/opengraph/objects/builtin/
Company isn't in the list. Website is the default that it's falling back to, and if you scroll down the page to where it has an example for a Website Object type, you can see it doesn't list support for all your properties, hence the Extraneous Property warnings.
You can create your own object type, though, that supports any properties you want. Create a Facebook Application, and go to the "Open Graph" section. You can create an action and an object type (such as, perhaps "like" a "company"), and then go to the "Open Graph/Dashboard" to add custom properties to your "company" object type. One type of custom property is a ContactInfo that would include your phone number and such; or you could just add a few string properties that are exactly what you need. You can then click "Get Code" to copy the new set of meta tags to use on your page.
This walkthrough probably describes the process better: https://developers.facebook.com/docs/customopengraph/walkthrough/
But really, after all that, if you're happy with how it is showing up on peoples' feed when they "Like" your page, then it is probably fine the way it is. You could add an og:description tag with any extra info you want in there, and just delete the extraneous tags.
old og:type like company, product ... are deprecated. They are not included in the current OpenGraph specification.
Very few og:type are still available (website, article, video....).
If you really want to use the og:type company, you will have to declare it in your own opengraph namespace.
CF : http://ogp.me/ , http://graph.facebook.com/schema/og/ and http://developers.facebook.com/docs/beta/opengraph/objects/builtin/
(the last link was first added by Melinda Weathers)
For the fb:admin tag, try putting in a personal profile's link.
i.e. your facebook page has a profile associated with it which is an admin to the page- the ID for the profile should work.

Multiple <meta> Tags with the Same Name

I need to specify multiple copyrights or authors using the <meta> tag. Can I use a <meta> tag with the same name multiple times?
<meta name="copyright" content="Company A" />
<meta name="copyright" content="Company B" />
Will the search engine respect both values? Or, do I need to comma-separate them in one <meta> tag?
Thanks.
Using multiple meta tags with the same name is valid HTML.
But we don't know how search engines and other readers will interpret them. Either two meta tags will be concatenated or one of them will be ignored/overwritten.
Example: The PHP-function get_meta_tags() will ignore multiple meta tags with an equal name.
To avoid possible problems I would recommend to use a single meta tag:
<meta name="copyright" content="Company A, Company B" />
If the page contains multiple meta tags of the same type, Google will aggregate the content values. For instance, they will interpret
<META NAME="ROBOTS" CONTENT="NOINDEX">
<META NAME="ROBOTS" CONTENT="NOFOLLOW">
The same way as:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
More details here:http://googlewebmastercentral.blogspot.ro/2007/03/using-robots-meta-tag.html
I guess most other search engines would handle the meta tags in the same way.

special characters not showing on page

I have meta tag as given below:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"/>
<meta name="keywords" Content="“SAT Course†“SAT exam†“SAT Prep†“SAT Preparation Courseâ€" />
<meta name="description" Content="Take Kaplan’s SAT preparation course. We use proven score raising strategies and give you access to 4 practice tests so you can take the test with confidence." />
<meta name="copyright" Content="Copyright Kaplan Test Prep and Admissions 2008" />
<meta name="Content-language" Content="en-uk" />
<meta name="Distribution" Content="global" />
<meta id="tcm" name="TMCID" Content="tcm:55-7918-64"></meta>
it was working fine but after some changes it start behaving differently. it is not showing special character properly some extra text is added on the page.
I have tried using charset='utf-8'.
Please suggest! what can be reason behind this.
The character set you have used to save the HTML in does not match the character set the browser thinks is being used. Check your editor to find out what you are really using.
I recommend setting it to UTF-8. This is a well supported encoding that supports just about any character you are likely to use, along with a large number that you aren't.
Note that the encoding you specify using meta tags does not override any encoding specified in real HTTP headers sent by your webserver. See http://www.w3.org/International/O-HTTP-charset for advice on how to change it.
As an aside, if you mean the language is "British English" then you want "en-gb" not "en-uk".