Glossary
Meta tags
Meta tags are HTML elements in a page’s head that describe the page to browsers, search engines, social platforms and other software.
Meta tags are HTML elements in the head of a web page that describe the page to software rather than to the person reading it. They are written as <meta> elements with a name or property and a content value, such as <meta name="description" content="...">, and they tell browsers, search engines, social platforms, chat apps and scrapers how to encode, display, index and preview the page. Readers never see them on the page itself; they see their effects, in a search result snippet, a link preview in Slack or the way a page scales on a phone.
The meta element has been part of HTML since the 1990s, and its uses have grown in layers. The first tags described the document for early search engines. Later ones controlled browser behaviour, such as character encoding and mobile scaling. Since 2010, Open Graph and Twitter Cards have used the same element to describe how a page should look when it is shared. A modern page often carries twenty or more meta tags, each read by a different consumer.
The main kinds of meta tags
Meta tags fall into four broad groups, according to who reads them.
Group | Example tags | Read by |
|---|---|---|
Document and browser | charset, viewport, http-equiv, theme-color | Browsers |
Search | description, robots, googlebot, google-site-verification | Search engine crawlers |
Social and preview | og:title, og:description, og:image, twitter:card | Social platforms, chat apps, preview services |
Informational | author, generator, application-name | Various tools, often ignored |
The <title> element and the canonical <link> element are not meta tags in the strict sense, but they sit in the same head section, serve the same audience and are usually discussed together. The canonical URL is declared with a link element, and the favicon is too.
Document and browser tags
The charset tag declares the character encoding, almost always <meta charset="utf-8">. It should appear early in the head, within the first 1,024 bytes of the document, so the browser can decode everything that follows. A missing or late charset is a common cause of garbled characters in scraped text, because parsers guess the encoding and sometimes guess wrong.
The viewport tag controls how a page scales on mobile devices. <meta name="viewport" content="width=device-width, initial-scale=1"> tells the browser to match the screen width instead of rendering a desktop-sized page and shrinking it. Without it, a responsive design does not behave responsively on phones.
The http-equiv attribute lets a meta tag act like an HTTP response header. It is used for a content security policy when headers cannot be set, and historically for page refreshes and redirects with http-equiv="refresh". Meta refresh redirects are still common on older sites, and they matter to crawlers because they add a hop that a redirect chain check may miss if it only follows HTTP redirects.
Search meta tags
The description tag gives a short summary of the page. Search engines may use it as the snippet under the title in results, though Google often rewrites snippets from page text when it judges another passage more relevant to the query. A description that matches the page and fits in roughly 150 to 160 characters is the practical target, because longer text is usually truncated.
The robots tag tells crawlers what they may do with the page. Common directives are noindex (do not show the page in results), nofollow (do not follow its links), nosnippet, noarchive and max-image-preview. The same directives can be sent as an X-Robots-Tag HTTP header, which is the only option for non-HTML files such as PDFs. Robots meta tags work page by page; site-wide crawl rules live in robots.txt, and the list of pages a site wants crawled lives in its sitemap.xml. A page blocked in robots.txt cannot have its noindex tag read, which is a frequent source of confusion.
The keywords meta tag is the best-known tag that no longer matters. Google said in 2009 that it does not use it for ranking, and other major engines followed. Adding it does no harm, but it gives competitors a list of the terms you are targeting.
Social and preview tags
Social tags decide how a link looks when it is shared. Open Graph properties, written with a property attribute, describe the title, description, type, URL, site name and og:image. Twitter Card tags, written with a name attribute, add X-specific fields such as the card type, and X falls back to Open Graph when its own tags are missing. Chat apps and preview services read both during link unfurling, then fall back to the title element and the description meta tag when social tags are absent.
Because several consumers read overlapping tags, the same information is often written three times: in the title element, in og:title and in twitter:title. Keeping them consistent is more important than filling every field. A page with an accurate title, description and og:image previews well almost everywhere. Schema.org structured data, written as JSON-LD in a script element, describes the same page for search engines in more detail and is a separate system from meta tags.
How software reads meta tags
Reading meta tags is a parsing job. A crawler fetches the HTML, finds the head and walks the meta elements, usually with an HTML parsing library that builds a DOM or a lighter streaming parser that stops at the end of the head. It normalises names to lower case, resolves relative URLs against the page address and picks a winner when the same property appears twice.
Two complications come up constantly. The first is client-side rendering. Pages built as single-page applications often inject their meta tags with JavaScript after load, and a parser that reads only the server’s HTML never sees them; a headless browser that runs the scripts first does. The second is inaccuracy. Tags are written by the site, and some sites reuse one description on every page, leave template placeholders in place or publish titles that do not match the content, a problem collected in 10 websites that lie in their Open Graph tags.
For agents and retrieval pipelines, meta tags are cheap, high-value context. A title and description label a source without reading the body, the published date (often in article:published_time) helps rank fresh material, and the author and site name support citations. That makes meta tags the first layer of metadata extraction from the web and part of what turns a raw page into LLM-ready data. The rest comes from the body: boilerplate removal, reader mode extraction and HTML to Markdown conversion.
A worked example
A team building a research agent wants every source it cites to show a title, a site name, a short description and a date. The first version stores only URLs and asks the model to describe each source from memory, which produces vague or invented labels. The second version fetches each page and reads its meta tags. For a news article, it gets og:title, og:site_name, the description meta tag and article:published_time. For a company blog built with a client-side framework, the static HTML holds only a generic site title, so the team routes such pages through a renderer before parsing.
The team also finds that 12 percent of pages share one description across the whole site. They treat a description as reliable only when it differs from the site’s home page description, and otherwise use the first paragraph of the body text. The agent’s citations now read as named sources with dates, and the stored metadata lets the agent filter its own library by site and recency. The same structure works for internal tools that list shared links and for a knowledge base that ingests web pages.
Writing good meta tags
A small set covers most needs. Every page should have a charset, a viewport, a unique title, a description written for that page, a canonical link, and Open Graph title, description, image and URL, plus twitter:card. Add robots directives only where a page should be kept out of search. Generate the tags on the server or at build time so every consumer sees them, and test with a plain HTTP request, not only in a browser.
Keep the content honest. A description that matches the page earns clicks from the people it is meant for; one written as bait raises bounce rates and teaches preview services and search engines to rewrite it. Review the tags whenever a page changes substantially, since stale titles and descriptions outlive the content they described and contribute to link rot in the wider sense: links that still resolve but no longer say what they promise.
Where Exabase fits
Exabase reads meta tags in several places. The Link Preview API returns a page’s title, description, site name, image and favicon from one GET /v2/link request, rendering JavaScript before parsing and falling back to the title element, the description meta tag and the first usable image when Open Graph tags are missing. It follows redirects and returns the final and canonical URLs, and the first 20,000 previews each month are free. See the link preview guide for the response format.
For full pages, Extract processes a URL into structured JSON with the title, site name and page content as text chunks, as described in the extraction guide; the website to JSON and website to Markdown tools are built on it. Saving a URL as a bookmark in Resources through the bookmarks endpoint stores its title, description, site name, favicon, a screenshot and a reader-mode copy, and indexes the content for Deep Search. For other options, see the best web scraping APIs and the best link preview APIs.
Frequently asked questions
What are meta tags?
Meta tags are HTML elements in a page’s head that describe the page to browsers, search engines, social platforms and other software, without appearing in the visible content.
Which meta tags matter most?
Charset, viewport, description and robots for browsers and search, plus Open Graph title, description and image and twitter:card for previews. The title element and canonical link are just as important, though they are not strictly meta tags.
Does the keywords meta tag help SEO?
No. Google has said since 2009 that it does not use the keywords meta tag for ranking, and the other major search engines ignore it too.
How long should a meta description be?
Aim for roughly 150 to 160 characters, written for that specific page. Search engines may still rewrite the snippet from page text when another passage fits the query better.
What is the difference between meta tags and Open Graph tags?
Open Graph tags are a kind of meta tag. They use the property attribute and the og: prefix, and they describe how a page should look when shared. See Open Graph.
Why can’t a scraper see my meta tags?
Usually because they are added by client-side JavaScript after the page loads. Render the tags on the server, or use a scraper that runs JavaScript before parsing.
How do I read a page’s meta tags through an API?
The Exabase Link Preview API returns a page’s title, description, image, favicon, site name and canonical URL in one request, with 20,000 free previews a month.
Related pages: Open Graph, Twitter Cards, og:image, canonical URL, URL metadata, schema.org structured data, link preview, free Link Preview API, Extract, best link preview APIs