Introducing the new data-nosnippet HTML attribute

Traditionally it’s been difficult to completely specify the description which is shown in search engine results. Sure, there’s the description meta tag, but that won’t be used if the search engine decides that there’s a selection of text on the page (a ‘snippet’) that works better for the specific search.

Google says: “(Our) generation of page titles and descriptions (or ‘snippets’) is completely automated and takes into account both the content of a page as well as references to it that appear on the web. The goal of the snippet and title is to best represent and describe each result and explain how it relates to the user’s query.

“We use a number of different sources for this information, including descriptive information in the title and meta tags for each page. We may also use publicly available information, or create rich results based on markup on the page.”

In other words, it’s worth trying to sculpt the search engine result to our liking, but to some extent things will be in the lap of the gods. However, for the really enthusiastic amongst us, some new methods allow “more fine-grained configuration of the preview content shown for your pages… through two types of new settings: a set of robots meta tags and an HTML attribute”.

These include tags such as “nosnippet”, “max-snippet” and “data-nosnippet”. There’s some explanation in this announcement from Google.