HTML-tag to annotate the origin of a section? - html

Google don't like it when you use same content across multiple sites, according to some.
Is there any way to annotate/tag a block of content with the "source".
Something like an attribute:
<div original-content="http://some.url">
The purpose is solely to let Google that we have duplicated the content (I.e. not as part of a search ranking strategy). Search engines could then use this information somehow.

This might help you out:
http://searchengineland.com/google-creates-metatags-to-help-id-original-news-sources-56115
Looks like the meta tag you want is
meta name=”original-source” content=”[url]”
However it looks like that is only for an entire page.

Use the canonical tag, which tells the web engine crawler that the text is duplicated from the original website.
Example:
Place this in the header of your HTML page (in the duplicated content page)
<link rel="canonical" href="http://www.original-website.com" />
Reference: Canonical URL Tag - The Most Important Advancement in SEO Practices Since Sitemaps

No, HTML has no such element or attribute.
If you quote the content (in a q or blockuote element), you could use the cite attribute. But you must not use these elements for anything other than quotes.
If the whole document is duplicated (or is a subset), you could use the canonical link type. But you must not use this if only part of the document is duplicated while the other parts are different.

Related

How to include meta data in HTML tags

I plan to use a headless-CMS to manage content on my website, so a non-technical content editor will be able to independently maintain content.
To assist the content editor map content between the website and the CMS, I need to inject a CMS ID into HTML tags. (thinking that the content editor will view the page source to find the value)
What is the standard way to inject meta data into a HTML tag?
E.g. <p cms-id=7adQpNPZxP4jK28RLp3wES></p>
You can use data attributes on elements - https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes.
It doesn't interfere with HTML semantics and is easily accessible with JavaScript.
The <meta> tag defines metadata about an HTML document. Metadata is information about data.
<meta> tags always go inside the <head> element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings.
Contentful DevRel here. 👋
The rendering has to be done by your server. Depending on the technology you use you have to place the id in the website. It's hard to give advice without knowing what you use to render the HTML.

Can the canonical tag be used on all pages?

Im working on a site that has had an SEO expert review it. They have advised me that we should apply canonical tags on every other page
<!-- http://www.example.com/detail/table&r=dining-room -->
<link rel="canonical" href="http://www.example.com/detail/table"/>
is it really required that the canonical tag only appears on every other page, or will it play nicely if it appears on the same page?
The reason I ask this is: isn't the link also telling Google that it is infact on the right page?
RFC 6596: The Canonical Link Relation specifies:
The target (canonical) IRI MAY:
o […]
o Be self-referential (context IRI identical to target IRI).
So, yes, you can use rel-canonical even on the canonical page.
It seems to be an argument between Google and Bing. Google doesn't mind if you have the canonical tag pointing to itself. Bing does mind and you lose their trust for the use of canonical tags. Look at this article: http://www.northsideseo.com/google-vs-bing-canonical-tag/

Hide Microdata property value in 'content' attribute?

I work on a website that recently had Schema.org markup added to it, but I think it is being used wrong.
Schema.org gives the example of
<span itemprop="name">Generic Name Here</span>
Our website implemented it in the following way
<span itemprop="name" content="Generic Name Here"></span>
Is the second way, our way, considered cloaking? We display the data to the user but at a different point and it is not marked up with itemprop.
In HTML5, the content attribute is only allowed on the meta element. Microdata doesn’t define it as global attribute either. But RDFa extends HTML to make content a global attribute.
According to your example, you are using Microdata. So you shouldn’t use the content attribute for span.
Microdata defines a way to add name-value pairs without having to mark up visible content: Microdata extends HTML5 to allow meta and link in body (in the future, this will be defined in the HTML5 spec directly; see the "Contexts in which this element can be used" for link and meta in the HTML 5.1 Editor’s Draft).
So instead of
<span itemprop="name" content="Generic Name Here"></span>
you should use
<meta itemprop="name" content="Generic Name Here" />
For schema.org, see Missing/implicit information: use the meta tag with content:
This technique should be used sparingly. Only use meta with content for information that cannot otherwise be marked up.
If you want to stick with microdata schema then you need to switch to the meta tag, exactly as 'unor' has written and explained very well. However, you could go with JSON-LD and put everything in the header and eliminate the badly written microdata if you want to save time. JSON uses the same schema method as microdata, but the coding is different.
I mean technically it correlates with the ideology of cloaking in the sense that the spiders are seeing something that the users aren't. Which is why i'm inclined to advise you to avoid such markup but also i'm not sure upon googles stance; as such markup isn't indicative of cloaking for SEO.
"Cloaking is a search engine optimization (SEO) technique in which the content presented to the search engine spider is different from that presented to the user's browser." .
Source - Wikipedia

The difference between two different HTML hyperlinks? (link & html tags)

I've been googling the internet and still can't seem to find an answer. I was wondering what the difference is between using something like:
<link rel="profile" href="http://gmpg.org/xfn/11" />
and
<html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
I'm using a HTML5 doctype and would like to keep everything clean. Am I wrong in thinking that these are somehow similar? Thanks!
These two types of links have about nothing in common, other than using HTTP URIs.
The profile link element links to another resource (often a web page), which should be relevant to the current page. Some browsers might show this link somehow in the user interface, or interpret it otherwise. Or search machines might use this.
For some rel values (like rel="stylesheet"), there are definitions on how to interpret them in the relevant standards, others are only used by human readers.
The xmlns:... links define an XML namespace prefix (og or fb) for the current document, with an URI used simply as identifier for the namespace. This means that you can now use elements in these namespaces, in addition to the normal HTML elements (by prefixing their names with og: or fb:).
The document at that URI will not be retrieved. The elements will either be already known by the XML processor reading the file, or simply ignored (if this is a simple browser interpreting this as HTML).
This is structural metadata about the current document (or element, in fact, as they are allowed on non-root elements, too, and only apply to the element they are on and its enclosed elements).
For your next question in the comment:
The Dublin Core metadata is information about the content of the current document. I can see no reason to use links (or URIs) here, so in fact neither of them fits. If you would put the metadata in a separate document, you could link to them (using a link element), but normally you would use a meta element with a name from the Dublin Core standard. (Inside the head element, of course.)
xmlns: is an XML attribute. HTML5 is not XML, so this is a worthless attribute in your document.

Which <meta> tags are useful and which not?

How many total <meta> tag available in X/HTML and Which should be used and which not?
see this tool http://www.ulhas.net/tools/tu-metagen
is there any pros to use all other meta tags other than meta description?
note: Google doesn't give any importance to meta keywords.
In terms of SEO, the description meta tag is what most search engines will usually show in search results, so that's quite important.
Google have said that they don't use the keywords tag at all. And the other searches engines value it very little, if at all.
The robots tag can be useful if you want to stop SEs indexing certain pages, but using robots.txt is the better option. Certainly, don't bother with "positive" instructions like INDEX, FOLLOW because that's what SEs do by default anyway.
The language and content type tags are best replaced with HTTP headers if you have that option. Same goes for caching, revisit-after etc but I'm not sure any browsers take note of that anyway.
Don't bother with the meta tags that relate to "creation" (i.e. author, copyright, generator and so on) unless you have a specific use for them.
First of all meta description and then language and robots.
You may also need verify-v1 temporarily when you are validating against http://www.google.com/webmasters
Edit: The robots tag is a SEO "tool" which can let you fine tune how the robots operate on your website. Language allows you to state the language in which the page is written in.
Which tags are useful and which
not?
All mega tags are useful, it is just that you use them when you need them. Also the link you provided does not say anything about usefulness or drawbacks or meta tags.
Use only those meta tags that you need, don't add not needed tags to your pages. This also makes page messy and longer to load.
Thanks :)