My Head is Feeling Stuffy

Written by James McDonald

February 20, 2014

Many different interests on the web want their own Web Metadata Protocols and Schemas to allow web site operators to present data to them so they can easily place it on their pages whether it’s social networks, search engines, browsers, mobile devices there are protocols and schemas that you can embed to have a specific icon, some text or an image appear on their platforms.

Aparently Facebook uses the Open Graph Protocol this allows you to specify the content that will be seen in the Facebook social graph. So you have to embed custom meta tags into your HTML head.

<html prefix="og:">
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="" />
<meta property="og:url" content="" />
<meta property="og:image" content="" />

Google likes you to embed markup so it can place the sometimes seemingly random text on your webpages into the right search categories.

<div itemscope itemtype ="">
  <h1 itemprop="name">Avatar</h1>
  <span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>
  <span itemprop="genre">Science fiction</span>
  <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>

iPhone wants it’s own custom meta tags in the head of your HTML so you can bookmark the site with a nice icon:

 <link rel="apple-touch-icon-precomposed" sizes="144x144" href="" />

Internet Explorer wants custom input into the head too:

<!--[if (gt IE 9)|!(IE)]>--> <html class="w3" lang="en" xml:lang="en" dir="ltr" prefix="og:"> <!--[endif]-->

<!--[if lte IE 6]>    <html class="ieAny ie6" lang="en" xml:lang="en" dir="ltr" prefix="og:">     <![endif]-->
<!--[if IE 7]>    <html class="ieAny ie7" lang="en" xml:lang="en" dir="ltr" prefix="og:">     <![endif]-->
<!--[if IE 8]>    <html class="ieAny ie8" lang="en" xml:lang="en" dir="ltr" prefix="og:">     <![endif]-->
<!--[if IE 9]>    <html class="ieAny ie9" lang="en" xml:lang="en" dir="ltr" prefix="og:">     <![endif]-->




Submit a Comment

Your email address will not be published.

You May Also Like…

PHP Iterators

Just came across a Youtube talk "Iterators in PHP" by Jake Smith published in 2014 that steps through the many...

PHP array_map Multiple Arrays

array_map can take multiple arrays. I like how it starts mapping through them starting at the first element of each...