In short. data-nosnippet="false" still excludes the element from Google's text snippet processing because the attribute remains present.
Definition: No.
data-nosnippetis a Boolean HTML attribute in Google's documentation. When the attribute is present on a supportedspan,div, orsection, Google treats the element's text as excluded from text snippets, including when the supplied value isfalse.
Key facts
- Google's robots metadata reference says that
data-nosnippetis a Boolean attribute and that any supplied value is ignored. - The same reference shows
data-nosnippet="false"with the commentalso not in snippet. - The WHATWG HTML Standard defines a present Boolean attribute as true and an absent one as false.
- The standard says that the values
trueandfalseare not allowed as Boolean values and that omission represents false.
Why does the value false still exclude the section?
HTML gives a Boolean attribute its meaning through presence. The WHATWG HTML Standard says that the presence of a Boolean attribute represents the true value, while its absence represents the false value. A present attribute may use an empty value or its canonical name, but its text value does not switch the attribute off.
Google applies that model directly to data-nosnippet. Its documentation identifies the attribute as Boolean and says that any value specified is ignored. Therefore, data-nosnippet="false" remains a present data-nosnippet attribute. The documented examples show the true and false forms followed by the same result:
<div data-nosnippet="true">also not in snippet</div>
<div data-nosnippet="false">also not in snippet</div>
<!-- all values are ignored -->
The WHATWG standard also states that the strings true and false are not allowed on Boolean attributes and that the attribute must be omitted to represent false. This is the HTML parsing rule that explains Google's example.
What HTML allows Google to consider for a text snippet
Omitting data-nosnippet removes this particular element-level exclusion. Google's documentation says that the attribute designates textual parts of an HTML page for exclusion from a snippet, and it specifies span, div, and section elements as the supported locations. An element without the attribute can therefore remain eligible for Google's snippet processing, subject to other page and serving rules.
The page-level nosnippet rule remains a separate control. Google documents it as preventing a text snippet for the page and says that, when robots rules conflict, the more restrictive rule applies. A page-level restriction can therefore affect a section even when that section has no data-nosnippet attribute.
How should a site check the markup?
Inspect the HTML for attribute presence, element type, and valid closing tags. Google's reference says that the HTML section must be valid HTML and that all appropriate tags must be closed. A section intended to remain available for snippet processing should omit data-nosnippet; a section intended for exclusion should use the attribute without relying on a value such as false.
Crawler access and rendering also matter to the documented behavior. Google says these settings can be read and followed only when crawlers can access the pages that contain them. It also says extraction of data-nosnippet may happen before or after rendering, and advises against changing the attribute on existing nodes through JavaScript. When JavaScript adds a DOM element, the documentation says to include the attribute when the element is initially added.
Related terms
FAQ
Does data-nosnippet="false" behave like an absent attribute?
No. The attribute is still present, and Google ignores its supplied value. Omit the attribute to represent the false state in HTML.
Can a custom element use data-nosnippet directly?
Google documents span, div, and section as the elements for this attribute. For a custom element, Google says to wrap or render it with one of those elements when data-nosnippet is needed.
Does omitting the attribute ensure that Google shows the section in a snippet?
Omission removes the element-level data-nosnippet restriction. Google may still apply other robots rules when it processes the page.
Sources
- Google Search Central, "Robots meta tag, data-nosnippet, and X-Robots-Tag specifications", 24 March 2026
- WHATWG, "HTML Standard", 19 October 2026
Check how a page reads to answer engines. Open the GEO score analyzer