Skip to content
YB Digital: WWW Publisher Of The Year Runner-Up 2021

YB.Digital

  • Home
  • Articles
  • Web
  • Office productivity
  • Salesforce
  • Google
  • Social network
Twitter meta tags in HTML
Web-en

Twitter meta tags in HTML

ybierling December 27, 2018December 19, 2018 meta tag, meta tag in html, meta tag twitter, meta tag twitter card, meta twitter card, metadata twitter, open graph meta tags twitter, open graph twitter, seo meta tags, twitter card, twitter card example, twitter card image size, twitter card meta tags, twitter card meta tags example, twitter card tags, twitter card types, twitter card validator, twitter image size, twitter meta tags, twitter metadata, twitter og meta tags, twitter open graph, twitter post image size, twitter share url with image, twitter website card specs

Twitter meta tags in HTML

In order to have a website URL showing properly in a Twitter card, some extra meta tags are necessary, with the publisher handle, the page title, the content description up to 200 characters, the creator content handle, and an image, that must be larger than 120×120 pixels.

Twitter SEO meta tags in HTML

The following meta tags have to be used, with below template that can be copied and pasted.

This is for Twitter cards only, and the meta tag in HTML should be pasted in the head section of the code:

<!– Twitter card –> <meta name=“twitter:card” content=“summary_large_image” /> <meta name=“twitter:site” content=“@Twitter_publisher” /> <meta name=“twitter:title” content=“Page title” /> <meta name=“twitter:description” content=“Page description” /> <meta name=“twitter:creator” content=“@Twitter_creator” /> <!– Twitter 280x150px image –> <meta name=“twitter:image:src” content=“http://www.url.com/img.jpg” />

Twitter meta tags in HTML : Twitter posts without meta tags and no card retrieved
Twitter posts without meta tags and no card retrieved

Twitter open graph

In order to have the whole Twitter website card specs, including the Twitter card meta tags and the Facebook open graph meta tags, the full code below can be used.

This will cover all social medias meta data HTML cards, and allow a proper sharing of your URLs on all of them:

<!DOCTYPE html> <html xml:lang=“en” xmlns=“http://www.w3.org/1999/xhtml” lang=“en” prefix=“fb: http://www.facebook.com/2008/fbml”> <head> <title>60 char title</title> <meta name=“description” content=“200 char description” /> <!– Twitter card –> <meta name=“twitter:card” content=“summary_large_image” /> <meta name=“twitter:site” content=“@Twitter_publisher” /> <meta name=“twitter:title” content=“Page title” /> <meta name=“twitter:description” content=“Page description” /> <meta name=“twitter:creator” content=“@Twitter_creator” /> <!– Twitter 280x150px image –> <meta name=“twitter:image:src” content=“http://www.url.com/img.jpg” /> <!– Open graph Facebook card –> <meta property=“og:url” content=“https://www.url.com/”/> <meta property=“og:type” content=“website/article/…”/> <meta property=“og:locale” content=“en-US” /> <meta property=“og:site_name” content=“Site name” /> <meta property=“og:image” content=“http://www.url.com/img.jpg” /> <meta property=“og:title” content=“60 char title”/> <meta property=“og:description” content=“Page description” /> <meta property=“article:published_time” content=“2018-11-06 11:32:39” /> <meta property=“article:modified_time” content=“2018-11-06 11:32:39” /> <meta property=“article:section” content=“Section” /> <!– Schema.org markup for Google+ –> <meta itemprop=“name” content=“Site name”> <meta itemprop=“description” content=“Page description”> <meta itemprop=“image” content=“http://www.url.com/img.jpg”>

Twitter meta tags in HTML : Twitter meta tags open graph HTML
Twitter meta tags open graph HTML

Twitter card meta tags

Once the Twitter metadata has been implemented on the website, sharing them will produce the look below, as the title, image and description will be properly retrieved by Twitter.

Twitter meta tags in HTML : Twitter card meta tags properly displayed
Twitter card meta tags properly displayed

Twitter card validator

An online application for developers is available on Twitter website, and allows devlopers to check by themselves if the rich cards have meta tags been properly implemented on their websites.

Simply open the webpage, paste a URL in which the Twitter rich cards should appear, and see the results, or the potential errors in case of tags wrongly implemented.

Card validator Twitter developers

Twitter meta tags in HTML : Twitter card validator
Twitter card validator

Twitter post image size

An image posted in a Twitter post must be at least 120 pixels wide by 120 pixels large, or 120x120px.

Respect this minimum requirements to be sure that your images will always appear properly on the Twitter posts and will make them have a good look.

Where Can I FLY ? (@wcanifly) Twitter
Yoann Bierling (@ybierling) Twitter
Help Smartphone (@help_smartphone) Twitter
Travel Comparator (@travelcomparato) | Twitter
Twitter developer platform – Twitter developers
Kiev beach club and Kiev nightlight in summer – Where Can I FLY?
Must-have social meta tags for Twitter, Google+, Facebook and more – Moz

Further readings

In order to optimize your meta tags for rich cards display and other social media sharing puroposes, have a look at these great websites full of useful information:

The Web Developer’s SEO Cheat Sheet 2.0
18 Meta Tags Every Webpage Should Have in 2014
The Open Graph Protocol
Snippet – Google+ Platform
Pinterest Rich Pins for Business
WooCommerce – Free WordPress toolkit that adds product markup

  • Purchase Info Record in SAP MM S4HANA
  • Visited countries map generator

Affiliate Disclaimer

Please note that some of the links on our site are affiliate links, which means that if you click on one of the links and purchase an item, we may receive a commission.
JavaScript, DevOps, JAVA, and .NET developers ready to work remotely on your projects immediately!
JavaScript, DevOps, JAVA, and .NET developers ready to work remotely on your projects immediately!
Trainings and certifications for your IT projects: SAP, office, project management, and more skills
Trainings and certifications for your IT projects: SAP, office, project management, and more skills

Recent Posts

  • 20 Best WordPress Plugins for Your eCommerce Business
  • How to Use Your Smartphone as a Productivity Tool?
  • Boost Your Projects with a DevOps Expert
  • What Are the Best Digital Marketing Certifications in 2024?
  • Evaluating the Effectiveness of Your RMF: Metrics and KPIs for Measuring Success

Useful links

Website optimization
Hotel booking

Hotel booking
Hotel booking

Flight, hotel, car comparison and booking
Flight, hotel, car comparison and booking

Find local activities
Find local activities

Transfer money
Transfer money

Archives

  • April 2025 (1)
  • March 2025 (1)
  • February 2025 (1)
  • September 2024 (1)
  • July 2024 (2)
  • June 2024 (1)
  • April 2024 (1)
  • March 2024 (9)
  • February 2024 (3)
  • October 2023 (1)
  • September 2023 (1)
  • April 2023 (1)
  • March 2021 (1)
  • April 2020 (16)
  • March 2020 (9)
  • February 2020 (20)
  • January 2020 (11)
  • December 2019 (4)
  • November 2019 (20)
  • October 2019 (23)
  • September 2019 (15)
  • August 2019 (5)
  • June 2019 (3)
  • May 2019 (23)
  • April 2019 (17)
  • March 2019 (16)
  • February 2019 (20)
  • January 2019 (16)
  • December 2018 (21)
  • November 2018 (18)
  • October 2018 (2)
  • September 2018 (13)
  • August 2018 (4)
  • July 2018 (2)
  • June 2018 (3)
  • May 2018 (3)
  • April 2018 (1)
  • March 2018 (1)
  • February 2018 (1)
  • January 2018 (2)
  • September 2017 (2)
  • August 2017 (7)
  • July 2017 (10)
  • June 2017 (2)
  • April 2017 (8)
  • March 2017 (7)
  • February 2017 (5)
  • January 2017 (8)
  • December 2016 (26)
  • November 2016 (14)
  • October 2016 (10)
  • September 2016 (8)
  • August 2016 (3)
  • July 2016 (2)
  • June 2016 (1)
  • December 2015 (1)
  • August 2015 (5)
  • July 2015 (1)
  • April 2015 (1)
  • March 2015 (1)
  • October 2013 (1)
  • July 2013 (2)
  • April 2013 (1)
  • November 2012 (1)
  • October 2012 (1)
  • September 2012 (1)
  • April 2012 (1)
  • February 2012 (1)
  • December 2011 (1)
  • August 2011 (2)
  • May 2011 (2)
  • April 2011 (4)
  • March 2011 (1)
Copyright © 2025 YB.Digital. All rights reserved.
Theme: ColorMag by ThemeGrill. Powered by WordPress.