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
-
Page Title Displaying differently on Google
Hi i am wondering why page title is display differently on google search. The combination of words that are being displayed on google are not on the page and the page title is simply "Camera Filters", however the page is showing as "our range of Camera Filters" (with the same capitalisation). http://awesomescreenshot.com/0cf4r09y27 I have optimised the age as best i can so it removes the OUR RANGE OF preface, however no luck. Any info would be appreciated. Cheers
Technical SEO | | andrewlos0 -
Google Search Results Display URL
Our urls show as www.domain.com/getproduct.aspx?productid=48376 (url #1) in Google search results. When you click on the link and go to the site the URL is www.domain.com/product-name.aspx (url #2) I checked in Google Webmaster Tools (Fetch as Google) and there is a 302 redirect from url #1 to url #2. It also shows a Set-Cookie value, ASP.NET_SessionID= If we make it a 301 redirect instead, will the url displayed in Google search results be the url #2? We need to get rid of the Set-Cookie for crawlers correct?
Technical SEO | | Guy_Huyett0 -
Why is Google's cache preview showing different version of webpage (i.e. not displaying content)
My URL is: http://www.fslocal.comRecently, we discovered Google's cached snapshots of our business listings look different from what's displayed to users. The main issue? Our content isn't displayed in cached results (although while the content isn't visible on the front-end of cached pages, the text can be found when you view the page source of that cached result).These listings are structured so everything is coded and contained within 1 page (e.g. http://www.fslocal.com/toronto/auto-vault-canada/). But even though the URL stays the same, we've created separate "pages" of content (e.g. "About," "Additional Info," "Contact," etc.) for each listing, and only 1 "page" of content will ever be displayed to the user at a time. This is controlled by JavaScript and using display:none in CSS. Why do our cached results look different? Why would our content not show up in Google's cache preview, even though the text can be found in the page source? Does it have to do with the way we're using display:none? Are there negative SEO effects with regards to how we're using it (i.e. we're employing it strictly for aesthetics, but is it possible Google thinks we're trying to hide text)? Google's Technical Guidelines recommends against using "fancy features such as JavaScript, cookies, session IDs, frames, DHTML, or Flash." If we were to separate those business listing "pages" into actual separate URLs (e.g. http://www.fslocal.com/toronto/auto-vault-canada/contact/ would be the "Contact" page), and employ static HTML code instead of complicated JavaScript, would that solve the problem? Any insight would be greatly appreciated.Thanks!
Technical SEO | | fslocal0 -
Will links to www and none www result in penalty?
Hello all, Normally i redirect my www to none www to avoid the potential of duplicate content and as its typically something that is done in SEO. I don't have access to the site of the company I am working for at the moment as everything related to the sites code goes through the web developer. At the moment the site lives at www and none www and one does not redirect to the other. I have been building links (organically as we engage on a few forums and blogs) to the www as that is how it is linked internally already and how links from the job boards we post on link. We do however have some natural none www links and my concern is that since the site isn't redirected that it is being penalised or could become penalised because of this. I imagine that it isn't a serious penalty if one at all but I would rather know so I can try and get it sorted as fast as possible. Thanks.
Technical SEO | | LukeHutchinson0 -
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 -
Will Google display the "@" Symbol in a SERP Title?
In our page title's, we'd like to include the "@" symbol. Will google display that symbol in the search results if we include it in the page's title?
Technical SEO | | sftravel0 -
Title Tag for homepage Not displaying correctly in Google Search Results
Hi We have a problem with how Google is is displaying our title tag when a user does a search on our company name Increation. I have attached two images of how the title tag for our Homepage is dispayed in Google Search Results. One of them is "increations" - this is the result which is displaying incorrectly. The other shows Kitchens | Bathrooms | | Luxury Kitchens | - which is how we want the title tag to be dispalyed. This inorreclt result is only displayed when a user types in Increation into Google. (BTW it only happens on Google, not the other search engines). To give you some background an external SEO company did some work for us (before I joined as usual :-)). They built a lot of anchor links with the word "Increations" pointing back to our home page. Is this whats causing the probelm? Also how can we resolve this issue so that the correct Title Tag is displayed. Thanks for your help. Mik increation_search_results_google#hyhfZ
Technical SEO | | increation0 -
Using a table with tabs to display information on website, work for seo?
When displaying data using a table, and a tab format to seperate different options, for example http://www.mousetraining.co.uk/ms-training/microsoft-excel-training-courses.html - under Standard Excel Training Course Levels / Training Details / Locations / Schedule - at the bottom of the page. Would search engines pick up the keywords from each of the tabs, or are they hidden?? Thanks
Technical SEO | | jpc10040