CSS vs Javascript vs JQuery drop down navigation
-
For a user / seo perspective, what is the best way to code a drop down menu nav bar? Is it best to use css, javascript or a scripting library like jquery?
I am thinking about overall best practice that will not have a negative impact on serps.
I am also thinking about what will work best on all types of devices i.e. desk tops, lap tops, smart phones and tablets.
What are the Pro's & Cons of Using CSS for Drop Down Menus.
What are the Pro's & cons of using Javascript for drop down menus.
And the same question for jquery.
Thank you all in advance for your ideas.
-
You can't go wrong with CSS. Endless styling possibilities. Also, I'd stay away from javascript because it's executed in order on the page. Meaning, if the JS doesn't load properly in the menu, the remaining JS below it wont load either.
-
Thumbs up to you too Joel and good luck with your project.
-
Seems like the seo jury has spoken and CSS it is. Thank you all for your help on this matter. Thumbs up to you all.
-
Hands down that CSS is the preferred way make dropdown menus. Google and on a lesser note, other search engines, have improved drastically with their ability to parse JavaScript / jQuery, and you may be able to get away with it, but it really should be avoided if possible. With the "new" CSS3 styles, you get almost any style you'd like with that.
-
Hi Joel,
I echo Marek's comments. However, I'm a great fan of making 100% sure that the bots can access everything that I want them to so if I'm ever in doubt I go with css and html combination as much as possible. We use Ajax and jQuery totally etc only on pages which we believe are 100% to be used primarily for user experience and engagement. E.g. When they're doing searches for specific things and the page needs to be ultra fast and efficient. However, we also try to ensure that we have crawlable pages which output the full content of a search wherever possible so that we can get the SEO benefit too. It also helps for when people have javascript disabled (not many granted).
I've seen so many ecommerce sites with great content but it's often got some kind of blockage that means a button has to be pressed or a form submitted to see it and if I'm not mistaken bots can't access this easily.
Hope this helps.
-
Hi Joel,
In my opinion CSS is "The Best". Simple, easy usage, easy changes, very good speed of page load ... etc...
As I red on many forums on the internet JQuery and JS are are available for robots, so there are no contraindications to employ them.
But
CSS - better code/text ratio (no long scripts in page code)
CSS - simple usage and changes (CSS3, HTML5)
CSS - faster loading (only simple text and html)
In my opinion, now when we have HTML5 and CSS3 there is no better way - it's innovative and simple solution,
Marek
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
-
Help, site traffic has dropped significantly since we changed from http to https
Heya, so I am just in charge of the content on the site, and the SEO content, not the actual back-end stuff. A little under 2 weeks ago we switched to https, and our site traffic has been down a lot ever since. When I SERP check our keywords, they don't seem to have dropped in rankings pages. Here is what I got when I asked our dev guy if 301 redirects were put in: I did not add any redirects so all of the content is accessible on both unless individual links get hardcoded one way or the other. The only thing in place is a Cloudflare plugin which rewrites links in cached pages to match the way its accessed, so if for example you access a page over https you don’t get the version cached with a bunch of http links since that will throw up mixed content warnings in the browser. Other than that WP mostly generates all its links to match whatever protocol you are accessing the current page with. We can make specific pages redirect one way or the other in the future if we want to though... As a startup, site traffic is a metric we track to gouge progress, and so I really need to get to the bottom of if it was the change from http to https that has causes the drop, and if so, what can we do about it? Also, in case it is relevant: the bounce rate is now sky high (ave. 15% to 64% this last week!) Any help is very welcome! Site: https://mobileday.com Thank you!
Web Design | | MobileDay1 -
Responsive Design vs Mobile For This Site?
They are going to do an entire website redesign for http://gaport.com/ and I think they should adhere to responsive design best practices. However, I'm just saying that because everything I have read says that's the "way of the future" if not the way of the present already. Any reason, they shouldn't do that and keep the desktop/mobile sites? Thanks, Ruben
Web Design | | KempRugeLawGroup0 -
Forms vs. Buttons
We are an IT services firm. A conversion for us is completion of a lead form. Generally speaking, is it better to have a form to fill out in the sidebar on most organic pages, or a button that takes you to a lead form? I see both used, which do you think converts better?
Web Design | | CsmBill0 -
Major Drop starting Jan 22 2013
I have a friend who has an ecommerce site. He got slammed in January. He doesn't buy links. In webmaster tools his queries and impressions are way down as well. his site is www.beastmasterrodeo.com. Any suggestions would be great
Web Design | | polarking0 -
Wordpress drop down menu issue...
While I am tweaking my current site with getting rid of my footer links, my site will not allow a drop down menu for my service area parent page. It will do a drop down menu for any other tab. Could not find anything in a google search besides just link to parent for drop down... Any ideas?
Web Design | | greenjoe0 -
3rd party commenting systems vs native?
I'm curious what you all think about using a 3rd party commenting system (like Disqus) vs the native wordpress commenting system? I've read so many reviews online it makes my head spin, so I wanted to see if any of you have any experience, or perhaps some trusted case studies. I was using the native comment system for a while, and then tried out Disqus; which seems to be good, but I'm not sure if people know how to easily get notified of new comments. With the native system there was a check box that said "subscribe," plus I used a plugin to redirect a first time commenter to a welcome page, as well as sent an email to them. I feel like Disqus makes it harder for people to get notified on new comments. However, I like giving people the ability to log in via different 3rd party channels (facebook/twitter/disqus, etc.) I know there are some 3rd party tools that allow you to do this on the native comment system as well. Any way, I'm just curious if anyone had any experience. Also I'm assuming the audience makes a big difference. My target readership is mommy's and parents, and not necessarily a 'tech" one; so I want to make the ability to comment very simple and easy for them. That's key. I'm sort of leaning on moving back over to the Wordpress comment system.
Web Design | | NoahsDad0 -
How WP Themes work with Navigation Structure for SEO and JQuery Headers?
I am trying to find the best WP Theme for our company. I noticed most of them do not offer a left hand side navigation on the home pages, and usually are on the right side on the inside pages. I always thought that Home Page links were very important for SEO. Currenly we have a left drop down navigation with all of our product catagories, keyword optimized. The structure follows for all the pages. Is this not as important to Search Engines anymore? Is it better to have a products link, to all the products and then the inside pages, have just a navigation bar, for that particular catagory? This seems to be very common on all the templates i am seeing. I also noticed, and really like the JQueary Tabs. I would use this for displaying, PDFs and Specifications Charts. Also, some home page images are using a jquery slider with some text, linking to a page. Is Jquery the new javascript and do search engines see what is in the code? I also noticed they all have footers that have links and some other information. Is this a SEO must have?
Web Design | | hfranz0 -
Which Shopping Cart is best for SEO? Magento vs. X-Cart
Comparing X-Cart and Magento, which do you think is better for SEO and why? I am leaning towards Magento and wanted to get some opinions?
Web Design | | BlinkWeb0