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
-
Mobile first - what about content that you don't want to display on mobile?
ANOTHER mobile first question. Have searched the forum and didn't see something similar. Feel free to passive- aggressively link to an old thread. TL;DR - Some content would just clutter the page on mobile but is worth having on desktop. Will this now be ignored on desktop searches? Long form: We have a few ecommerce websites. We're toying with the idea of placing a lot more text on our collection/category pages. Primarily to try and set the scene for our products and sell the company a bit more effectively. It's also, obviously, an opportunity to include a couple of long tail keywords. Because mobile screens are small (duh) and easily cluttered, we're inclined _not _to display this content on mobile. In this case; will any SEO benefit be lost entirely, even to searchers on desktop? Sorry if I've completely misunderstood mobile-first indexing! Just an in-house marketing manager trying to keep up! cries into keyboard Thanks for your time.
Technical SEO | | MSGroup
Ross0 -
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 -
GWT Fetch & Render displays desktop version of site as mobile
Hi team, I noticed that when I request a desktop rendering in GWT using fetch and render, pages render as the mobile version. Screenshot attached. It's related to the VHS units in our CSS (as far as I'm aware). Does anyone know what the implications of this may be? Does it mean googlebot can only see the mobile version of our website? Any help is appreciated. Jake jgScJ
Technical SEO | | Jacobsheehan0 -
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 -
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 -
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 -
How to display the exact url of our subsite in Google
Hi, I'm new to SEO and we just recently relaunched our site. Our site consist of 6 hotels that acts as a subsite. We noticed that when search for one of the hotels what is coming in the google is the main website. Example: We search for flora grand. We expect that in Google it will display the first link as www.florahospitality.com/dubai-flora-grand-hotel.aspx. But it show the main site which is www.florahospitality.com What do I miss here?
Technical SEO | | shebinhassan0 -
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