2

I have a website about math problems and its solution. At first, I only display the problems, empty div for solution later, and button that will use AJAX to display solution when clicked.

But, since it reduces my content length, I choose to display the non rendered solution at that zero height div. I don't know if it is good though. And the button is used to retrieve the rendered solution, and change the non rendered one with it.

My question is, is that bad for SEO? If yes, what is the better method for that?

4
  • Why do it that way instead of "visibility:hidden" and then use javascript to change it via onClick to "visibilitiy:visible"?
    – Steve
    Commented Oct 9, 2022 at 1:31
  • @Steve - I don't think that you want the answers to be visible in the page source, before the button is clicked. Commented Oct 9, 2022 at 1:37
  • The non rendered solution, that still have latex code, is visible in the page source. The button is there to get the rendered solution, that generated by MathJax. Commented Oct 9, 2022 at 1:48
  • Does visibility hidden better than zero height div for seo? Commented Oct 9, 2022 at 1:50

1 Answer 1

5

I make an effort to have all content visible at some point with normal usage, just wanted to disclose my bias first.

Use cases for content not visible on a page at some point with normal usage.

  • Slide carousel, (where images and text are presented in an animated manner)
  • Skip to main content, (where a hidden link is used for the visually impaired which is displayed when a visitor presses the tab key to focus on the first link of the page) ... being used by major sites such as youtube. skip navigation link
  • Menus that expand

  • Et la.

These use cases have in common that the information is eventually going to become visible. In a CSS zero height div, the reveal may be using javascript to activate the

element {height:0px} # hidden on load
element:onfocus {height:300px} # not hidden after 

interaction of some type


I believe that using a link, button, or javascript to expand an answer would be a reasoned use case. It would be seen by more people than the skip navigation button.

Note this portion of the page for educators and QA pages has been recently updated by Google if you are looking at Schema: https://developers.google.com/search/docs/appearance/structured-data/qapage#content-guidelines

Here is Google's explanation on the content guidelines changes to Danny Goodwin: https://searchengineland.com/google-education-qa-content-guidelines-387545

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.