3

What are the options for a dropdown menu?

  • select - can't contain links
  • div with initial display none - Might incur a penalty + might not be indexed
  • div with onload display none by JavaScript - Might cause a flicker on load

Is there a better option?

4
  • 1
    Whats wrong with using <ul>? May 27 '15 at 18:55
  • @bybe Nothing. I didn't mean div as opposed to ul. I was just using that as a generic html tag.
    – ispiro
    May 27 '15 at 18:56
  • Search engines do not penalize for display:none and display:none does not make content uncrawlable. May 27 '15 at 18:57
  • @bybe a) Thanks. b) You can transform your comment into an answer.
    – ispiro
    May 27 '15 at 19:00
3

CSS Hidden

Google and other search engines do not penalize sites for using display:none and in fact its extremely common that most sites use it for one reason or more.

JavaScript Content

Google and other search engines can understand JavaScript to some extent and again it is extremely common for websites to inject and modify things in the DOM.

Cloaking

What Google and other search engines look for is cloaking, intentional populating the web page without allow site visitors to view that content in anyway. Google can associate hidden content with triggers in both CSS, HTML and JavaScript.

There are dozens of ways that this can be done, from display none with no triggers to even going as far to use a small font and text color the same as the background color, therefor making the text invisible to site visitors but viewable by Google, but Google has been around for decades, it understands cloaking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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