Hidden Content & SEO: The Truth About display:none in 2026
“Does Google index hidden content?” This is one of the oldest debates in SEO. With the rise of mobile-first indexing and modern UI frameworks like React and Vue, the answer has evolved.
In 2026, the short answer is yes, but with caveats. Let’s break down how Google treats content hidden via CSS (display: none) versus content removed from the DOM (conditional rendering).
For a broader context on how Google processes content, check out our guide on Core Web Vitals in 2026.
The Evolution of Hidden Content
Desktop Era vs. Mobile-First Era
In the past, Google devalued content that wasn’t immediately visible to the user on page load. However, with the shift to Mobile-First Indexing, Google acknowledged that screen real estate is limited on mobile devices.
Google’s John Mueller has confirmed multiple times: Content hidden in tabs, accordions, or “read more” buttons for user experience (UX) purposes is given full weight.
CSS Hiding: display: none & visibility: hidden
When you use CSS to hide content, the HTML element still exists in the DOM. Googlebot parses the HTML, sees the content, but also sees the CSS rule hiding it.
SEO Impact
- Indexing: Google indexes this content. It can rank for keywords found within it.
- Weight: In 2026, hidden content is generally treated equally to visible content, provided it’s easily accessible to the user (e.g., via a click).
- Risk: Hiding keyword-stuffed text that users can never see is considered cloaking and is a violation of Google’s Spam Policies.
Framework Rendering: Vue v-if vs v-show & React
Modern frameworks offer two ways to hide content, and the SEO implications are vastly different.
1. Conditional Rendering (e.g., Vue v-if, React {condition && ...})
This method removes the element from the DOM entirely.
- Googlebot: Does NOT see this content in the initial HTML or rendered DOM. Learn more about how Googlebot WRS handles this.
- SEO Impact: Zero. If the content isn’t in the DOM, it doesn’t exist to the crawler.
- Use Case: User-specific data (e.g., dashboard profile) that shouldn’t be indexed.
2. CSS Toggling (e.g., Vue v-show, React style={{display: 'none'}})
This method keeps the element in the DOM but adds display: none.
- Googlebot: Sees and indexes this content.
- SEO Impact: Full. The content is crawlable.
- Use Case: Accordions, tabs, mobile menus, and any content you want to rank for.
Best Practices for 2026
- Use
v-show/ CSS for SEO Content: If you want it indexed (FAQ sections, product details in tabs), ensure it’s in the DOM. - Avoid Layout Shift (CLS): When revealing hidden content, ensure it doesn’t push other content down unexpectedly. Use animations or reserved space. See our CLS optimization tips.
- Accessibility (a11y) is Key: Google uses accessibility signals. Ensure hidden content is accessible via keyboard and screen readers (
aria-expanded,aria-hidden). - Don’t Hide Core Content: Your main value proposition and H1 should always be visible immediately.
Conclusion
Hidden content is a powerful design tool. For SEO, the rule is simple: If you want it ranked, keep it in the DOM. Use display: none responsibly for UX, but avoid removing critical SEO text with conditional rendering logic unless it’s truly irrelevant to search engines.