Recent Posts

Web Text Hidden By CSS and JavaScript Is Weighed Low By Google

Many web pages are structured so that some of their text is only displayed onscreen via CSS or JavaScript that has been triggered by user input. For example, when a piece of content is displayed with a button at the bottom that says something like “Read More,” clicking it makes the button disappear and makes the remaining portion of that content display. When users browsing the web are looking at online stores, descriptive text content is often contracted like this so that the browser sees only relevant introductory text. From there, the user may be enticed and may click on the button to read more details of interest.

This is a common tactic in luring potential customers without forcibly displaying extra details that might not be of interest to browsers that aren’t planning to purchase the product or service. In addition to the promotion of a better-formatted user experience, many site owners include this so that they can track how often consumers who may not ultimately buy anything are at least interested enough to dig deeper and bring up the additional information.

However, hiding text content behind expandable buttons ironically runs counter to the equally important need to increase the web page’s SEO and prominence in search engine results, most notably those of Google. In the particular case of Google, this is because the text that is hidden by default, while recognized by the engine to be in the source code of the web page, is ruled to be not as significant as the text that is allowed to display as soon as the page opens. Therefore, text hidden by scripts do not contribute as much as they should to the process of causing web pages to appear as highly in Google search results.

Oddly, other search engines do weigh visible text and the text that is initially hidden as equally significant in terms of SEO. Yahoo and Bing are notable examples, but Google is the most prominent and popular search engine used today by an extremely wide margin. This is why anyone who plans to hide text behind a JavaScript button will have to determine on their own whether hiding text to make a web page easy for visitors to visually parse is worth allowing that particular text to only do some of its part to help the page itself be visible to search engine users.

There is at least one option that site owners can pursue in order to more-or-less enjoy the benefits of both SEO optimization and organized visual priority, however. An overlay element can be displayed on the screen as soon as a web page is opened so that a relevant message can be shown effectively and directly in the center of the browser window, and it will occupy a box that only visually covers the text displayed on the page underneath. The user’s natural instinct will be to read what is shown right in front of them and then close the overlay in order to be allowed to read the text that explains and qualifies that message. Meanwhile, the fact that the text beneath the overlay is still considered to be the page’s “up-front content” will cause all of it to fully contribute to the page’s SEO.