Display: none
-
A prominent SEO consultant recently told me that using display:none in the css is still a bad idea. We built a simple drop down menu using widely used jquery techniques and it uses display:none to slideToggle the menu.
Does anyone else think this is a bad idea? If so, how should I change it since just about every jquery drop down I come across uses the slideToggle/display:none.
-
I'd suggest checking that any jquery solution hides stuff with display:none after the page has loaded. Essentially is the content/menu fully visible when you turn javascript off and load the page? (regardless of how horrific the display looks?)
Bear in mind that Google also advises against things like display:none for implementation of things like microformats.
-
Using display:none is fine. There's JavaScript on the page that will make those items display when the users takes some action on the menu. Google has some way of reading the JavaScript to see what may be displayed, and at this point, I'm sure they're very good at detecting these types of menus. I don't think you can't make a menu like that without using it, and tons of sites use them.
Obviously, you shouldn't use display:none to cloak text on the page, when no user action can get that text to be displayed.
-
Conventional wisdom says this is a bad idea because its a technique used by black-hats to stuff keywords into their documents. See:
http://www.mattcutts.com/blog/seo-mistakes-unwise-comments/
However, for JQuery and things like menu's and screen reader links, Google appears to know the difference. See:
http://www.google.com/support/forum/p/Webmasters/thread?tid=50f9a4942ac605ec&hl=en
The takeaway is you can use this, and its unlikely to get your site penalized. But be careful that what you're doing is both (a) common practice and (b) couldn't get caught in a spam finding algorithm. If you are in MLM or pharmaceuticals or something that often gets associated with spam, you'll want to avoid using these techniques. If there's no way your site could be considered spam and you're using display:none legitimately, then you'll be safe.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Incorrect Logo is Displaying on Google Knowledge Graph - Need Urgent Solution!!
Incorrect Logo is Displaying on Google Knowledge Graph for our company. We have structured schema for logo etc. But still, Google is fetching and showing logo from some other sources on google search results. What will be the right fix for this? Our site url : http://www.travelyaari.com/
Technical SEO | | RobinJA0 -
How are these links being displayed?
How does one markup their site to get the small sitelinks to appear in SERP listings as seen in the example image below? jJiQYy3
Technical SEO | | SelectHub0 -
Title in google organic display
The title (top link) in my organic result in google search has my page title then a dash and another keyword. This keyword is not related to the search result. It may discourage clicks. Where does google get that and how can i change it? For example: Page Title - unrelated keyword
Technical SEO | | bhsiao
url
link description0 -
Rich Snippets Inconsistent Display
Hi Folks, We implemented Schema mark up on our hotel details page many months ago now (previously we had a different mark up language, but switched to Schema during a complete page re-design). Its been live for plenty of time now and is being picked up in webmaster tools. http://www.asiarooms.com/en/singapore/singapore/175433-orchard_hotel_singapore.html Even before we switched to Schema we had a very inconsistent display of rich snippet data in the search results and this has continued despite the mark up being implemented correctly. For example, a search in Google Singapore for 'Orchard Hotel Singapore' shows the AsiaRooms.com listing without any rich snippets. You can see that the vast majority of our competitors like Agoda, Booking.com always show rich snippet data (search for 'orchard hotel singapore agoda' for example). I have checked the hotel in the rich snippet testing tool and its marked up correctly such that it should feasibly show the review count and the score. http://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Fwww.asiarooms.com%2Fen%2Fsingapore%2Fsingapore%2F175433-orchard_hotel_singapore.html&html= Whilst Agoda and Booking seem to display rich snippet data on literally EVERY hotel, its very inconsistent for AsiaRooms which is extremely frustrating - feels like some kind of punishment or favouritism. Any ideas why this might be the case and anything I could try to resolve it? Thanks, Ben
Technical SEO | | BenRush1 -
Setting preferred domain as www or none www
Way back before panda I used to rank for certain keywords pretty well. Of course like many others after panda I lost some of those rankings. I have been getting better since then so its not that bad. I was poking around in Google Webmaster Tools and I noticed something which I need some clarification in. History my site freescrabbledictionary.com used to be indexed as a none www. Then some time ago I can't remember when I set it to www. Tonight I was looking through my webmaster tools and I noticed something that did not make sense to me. In my content keywords section for the none www my list is as follows Content Keywords <form action="https://www.google.com/webmasters/tools/keywords-list?hl=en&siteUrl=http://freescrabbledictionary.com/" method="GET"> Keyword Significance 1. scrabble 2. words (2 variants) 3. dictionary 4. cheat 5. finder 6. friends 7. maker (2 variants) 8. noun 9. letter (2 variants) 10. hasbro 11. mattel 12. spear 13. found (2 variants) 14. sowpods 15. freescrabbledictionary 16. builder 17. affiliated 18. search 19. solver 20. lists </form> Then I looked at my www lists and its Content Keywords <form action="https://www.google.com/webmasters/tools/keywords-list?hl=en&siteUrl=http://www.freescrabbledictionary.com/" method="GET"> Keyword Significance 1. words (3 variants) 2. scrabble (2 variants) 3. letter (4 variants) 4. points 5. cheat (3 variants) 6. friends (2 variants) 7. finder (2 variants) 8. anagram (2 variants) 9. dictionary 10. tool (2 variants) 11. hasbro 12. mattel 13. spear 14. game (4 variants) 15. mobile 16. affiliated (3 variants) 17. berkshire 18. canada 19. calculations (5 variants) 20. coming (4 variants) </form> My none www version has the order (especially the first 5 keywords) that I want, my www version is no were near it. If I change back to the none www version could I possible see an change in rank? or can it effect it if I change it? I am starting to think I shot myself in the foot when I switched...
Technical SEO | | cbielich0 -
Change in how Google displays SERPs
Hi All, Recently our SERPs have changed in Google results to show product prices from our pages rather than the meta description. This just started to happen in November with no change (that we know of) on our side. I have attached a from and to SERP image if that helps. Does any one have any ideas as its starting to effect our rankings? Thanks, Tony. Tkeou,6jg6Q Tkeou,6jg6Q#1
Technical SEO | | tstauntonwri0 -
Page Title Not Displayed in SERPS
Why would a page title not be displayed in the SERPS? Everything appears to be formatted correctly in the code, yet the title of the company gets displayed instead of the page title? Any general idea why this could be happening?
Technical SEO | | MichaelWeisbaum0 -
Best way to display maintenence mode on a website?
I have a website with lots of traffic and sometimes the backends fail. I want to use lighttpd to show that the website is under mantenence and should be back up shortly. I was thinking of using Soft 503 errors or doing a 302 for every page to /maintenance.html. What would you do (besides fixing the backends, we are already doing that :P) to avoid hurting your SEO efforts? Thanks in advance Mariano
Technical SEO | | marianoSoler980