Skip to content

Instantly share code, notes, and snippets.

@mystroken
Last active November 8, 2021 19:37
Show Gist options
  • Save mystroken/a35cc8230a55dd8dc5d4d42e91e4709b to your computer and use it in GitHub Desktop.
Save mystroken/a35cc8230a55dd8dc5d4d42e91e4709b to your computer and use it in GitHub Desktop.
Structured Data Markups using Microdata - https://schema.org
<article role="article" itemid="http://example.com/article-1" itemscope itemtype="http://schema.org/BlogPosting">
<link itemprop="mainEntityOfPage" href="http://example.com/article-1" />
<h2 itemprop="headline">
<a itemprop="url" href="#" title="">Article title</a>
Coming this April, HBO NOW will be available exclusively in the U.S. on Apple TV and the App Store.
</h2>
<img itemprop="image" src="http://images.apple.com/live/2015-mar-event/images/573cb_xlarge_2x.jpg">
<p>
Published by <cite itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Mystro Ken</span></cite>
<time itemprop="datePublished" datetime="2015-03-09T13:08:00-07:00">March 9, 2015 1:08PM</time>
<time itemprop="dateModified" datetime="2015-03-09T13:09:20-07:00"></time>
</p>
<div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<span itemprop="name">Google</span>
<span itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="url" content="https://google.com/logo.jpg">
</span>
</div>
<p itemprop="description">Welcome to live coverage of the Apple Spring Forward …</p>
</article>
<body itemscope itemtype="http://schema.org/WebPage">
<article itemprop="mainEntity" itemscope itemtype="http://schema.org/BlogPosting">
<h1 itemprop="headline">
Coming this April, HBO NOW will be available exclusively in the U.S. on Apple TV and the App Store.
</h1>
<p itemprop="articleBody">It's $14.99 a month.<br> And for a limited time, …</p>
</article>
</body>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Site Title</title>
<link rel="stylesheet" href="/assets/css/style.min.css">
</head>
<body role="document" itemscope itemtype="https://schema.org/WebPage">
<header role="banner" itemscope itemtype="http://schema.org/WPHeader">
<hgroup>
<h1 itemprop="name">Site Title</h1>
<h2 itemprop="description">Site Description</h2>
</hgroup>
</header>
<main role="main" itemscope itemprop="mainContentOfPage">
<!-- The page's content goes here -->
</main>
<aside role="complementary" itemscope itemtype="http://schema.org/WPSideBar">
<section class="widget">
<h4 class="widget__title" itemprop="name">Site Sidebar Widget 1</h4>
<div class="widget__text">
<p>This is the Site Sidebar Widget 1</p>
</div>
</section>
<section class="widget">
<h4 class="widget__title" itemprop="name">Site Sidebar Widget 2</h4>
<div class="widget__text">
<p>This is the Site Sidebar Widget 2</p>
</div>
</section>
</aside>
<footer role="contentinfo" itemscope itemtype="http://schema.org/WPFooter">
<p class="copyright">
&copy; <span itemprop="copyrightYear">2017</span>
<span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Site Holder Name</span>
</span>.
</p>
</footer>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/assets/js/scripts.min.js"></script>
</body>
</html>
<!-- Navigation -->
<nav>
<ul role="navigation" itemscope itemtype="https://schema.org/ItemList">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/SiteNavigationElement">
<a itemprop="url" href="https://example.com">
<span itemprop="name">Menu Item #1</span>
</a>
</li>
</ul>
</nav>
<div itemscope itemtype="https://schema.org/WebSite">
<meta itemprop="url" content="https://www.example.com/"/>
<form itemprop="potentialAction" itemscope itemtype="https://schema.org/SearchAction">
<meta itemprop="target" content="https://query.example.com/search?q={search_term_string}"/>
<input itemprop="query-input" type="text" name="search_term_string" required/>
<input type="submit"/>
</form>
</div>
@hellowebhelp
Copy link

wow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment