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
-
Changing Ecommerce Site Display style will it impact on seo & performance?
Hello Expert, Do redesign website will affect seo? At initial level drop in visitor, pageviews? Actually I am redesign my ecommerce site but we are not changing 1) url's 2) we are not changing content 3) we are not changing server 4) we are not changing navigation. We are changing display style at homepage, category page, subcategory page, product page, checkout step. So still it will impact on website visitors & pageviews? 2) How google will react on int 3) How visitor will react? Thanks!
Technical SEO | | Johny123450 -
Google displays multiple titles for same article. What does this mean?
I've linked to some screenshots so that it what I'm talking about makes more sense. Sometimes, when I perform a search, I see an article with the correct article title listed as the page title in the SERPs. Other times, I see the wrong page title – it's a generic somethin' or other done by my client's web design company with a bunch of keywords thrown in. The latter (not the correct article title) also appears at the top of the browser tab for every article on my client's site. I know this is bad, but what can be done about it? This would never happen if my client used Wordpress or some easily modifiable CMS, but they're using a proprietary one maintained by the group that designed the website. open?id=0BxB_dYL1ylGgVVF1dHlwdXp2dFU open?id=0BxB_dYL1ylGgdWJjdlJoRlRIR00
Technical SEO | | Greenery0 -
Why is Google not displaying the right URL on SERP?
Google is not displaying the URL correctly for this page. (See image) Here is the search that I performed: http://goo.gl/xk7L8 If you click on the URL, it doesn't take you to the page that it the URL references. Any ideas? It should show this URL: http://www.theskincentermd.com/breast-enhancement tsc-serp.png
Technical SEO | | theBREWROOM0 -
Advice on display this content on my page for search engines
Hi, my website http://www.in2town.co.uk/Holiday-News is about bringing travel and holiday news to our readers of our lifestyle magazine but i am having problems at the moment with the layout. What i mean by this is, i have written content on the page as an introduction so google knows what this section of the site is about but to be honest it looks rubbish with having the introduction there and i would like to know if i am doing the right thing by having the content there for google to know what my site is about. I have tried taking it away and noticed i dropped in the rankings and when i have put it back up i go up in the rankings, can anyone please give me some advice over this issue
Technical SEO | | ClaireH-1848860 -
Rel = author display issue
I want to enter some products as blog posts. I don't want users to see the post info, but do want SE's to see rel="author". I can do this by setting display to "none" in a CSS style. The post info does not appear in the browser but is still in the page source. Will search engines be able to see the post info?
Technical SEO | | waynekolenchuk0 -
How can I exclude display ads from robots.txt?
Google has stated that you can do this to get spiders to content only, and faster. Our IT guy is saying it's impossible.
Technical SEO | | GregBeddor
Do you know how to exlude display ads from robots.txt? Any help would be much appreciated.0 -
Does it matter that our cached pages aren't displaying style
We've got pages that, when I search for them in Google and click on Cache, show NO styles, nothing from the CSS. Is there any way that could effect rankings? I don't think so, but it does fall into the category of showing one thing to the bots and another to the user, which is bad. Also, could blocking /scripts in robots.txt be preventing bots from accessing the CSS? Thanks
Technical SEO | | poolguy0 -
How do I get Google to display categories instead of the URL in results?
I've seen that for some domains Google will show a nice clickable site heirarchy in place of the actual URL of a search result. See attached for an example. How do I go about achieving this type of results? categorized.png
Technical SEO | | Carlito-2569610