Twitter Card Meta Tags
You'll learn how to implement Twitter-specific metadata to control how your pages appear when shared on Twitter.
What Are Twitter Card Meta Tags?
Twitter Card meta tags are special HTML elements that tell Twitter how to display your content when someone shares your link. While Twitter can fall back to Open Graph tags, using Twitter's own tags gives you precise control over the Twitter sharing experience.
Think of them like filling out a specialized form for Twitter's link preview system — you're providing exactly the data Twitter needs to create rich, engaging cards.
The Essential Twitter Tags
twitter:card
Defines the card type you're using:
<meta name="twitter:card" content="summary_large_image">
This must match one of the Twitter Card types (like summary_large_image or summary) you learned earlier.
twitter:site
The Twitter username of the website or brand:
<meta name="twitter:site" content="@YourBrandHandle">
This appears in the card's attribution and helps Twitter associate the content with your account.
twitter:creator
The Twitter username of the content's author:
<meta name="twitter:creator" content="@AuthorHandle">
This credits the individual creator, useful for blogs and personal content.
Twitter Image Properties
While Twitter often uses Open Graph images, you can specify Twitter-specific images:
<meta name="twitter:image" content="https://example.com/twitter-image.jpg">
<meta name="twitter:image:alt" content="Descriptive alt text">
The twitter:image:alt tag improves accessibility by providing alternative text for screen readers.
Complete Example
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@YourSite">
<meta name="twitter:creator" content="@JohnDoe">
<meta name="twitter:image" content="https://example.com/share.jpg">
<meta name="twitter:image:alt" content="Article preview image">
Key Takeaway: Twitter Card meta tags give you fine-grained control over Twitter sharing, with twitter:card, twitter:site, twitter:creator, and image properties working together to create rich, properly-attributed preview cards.