Using More Info javascript:toggleDisplay tag for More info text
-
Is there any harm in using javascript so a user can "toggle" open or closed additional text on a website?
For example, if a user wants to read more about something, they can click on "More Info" and the text would then appear.
Google is able to read the text, because I chose a random 8 word section of the text within the More Info and pasted it into a Google Search and the website showed up in search results.
Just wondering if using this technique would have any negative impact.
Here's what the code would look like:
<a <span="">title</a><a <span="">="Show Tables" href="</a><a class=" " target="_blank">javascript:toggleDisplay('table1')</a>">More Infostyle="display: none;" id="table1"> this is where the text would be, and from this section was where I grabbed text to search with in google.
Then in the footer, here is the script needed so the more info will work:
I am by no means an expert in coding/html/javascript.
Thanks!
-
Hiding text in this manner is a perfectly acceptable UI choice, and will not negatively impact your site.
When people talk about hiding text being a negative factor, they are referring to cases where people will stuff tons of keywords into invisible divs, or have text that's the same background as the page, or other methods of presenting the search engine with different content than the user, which is basically cloaking.
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
-
H1 tag within on top nav but css class styled appear at bottom
Hi, Sorry the similar question could have been ask previously but I couldn't get an exact answer. Someone put a h1 tag on our homepage (which do not have before) and the is within the top nav. But it has a css style class in that h1 tag to make it appear at the bottom of the page so not everyone would be aware of that small h1 title. I personally do not think that's going to help with seo. However I want to know if this practice is going to be: beneficial, or not at all? or harmful instead? Thanks LM
Web Design | | LauraHT0 -
Best SSL Certificate to Use
I am setting up an ecommerce website that will sell batteries and like most e-commerce sites we will be taking credit cards. I was exploring the different SSL certificates and providers and I was shocked at the difference in pricing. Anywhere from free to over $1000! What is really necessary and what is nice to have? Any suggestions on SSL providers? Thanks
Web Design | | Atlanta-SMO0 -
Does Using Magento With Multi Sites Affect SEO
We have a client who has 3 separate websites targeting the US, Australia, and the UK. Each of them has relevant ccTLD's such as: .com .com.au and .co.uk. Our client wants to use the Magento multi-site function so it combines all the stores (which are the exact same products) and merge it into one through Magento. These sites are all hosted in the US and had nothing to do with me haha! I understand Rand has mentioned on a video it would be best having the websites with ccTLD's hosted in that country (if budget permits), however in this case the budget doesn't permit us to go down that road. Has anyone any advice on this matter, has anyone did this before and had a lot of success with the SEO? At present there doesn't seem to be a lot of information about it and opinions are varied and sometimes divided. Any help would be very much appreciated guys Thanks, Matt
Web Design | | HigherthanSEO0 -
Auto-Generated META tag on 404 Page
I'm currently creating a 404 error page for my site and I noticed that a similar site uses some sort of code to automatically generate a meta title. Is this useful? For instance type in electrolux.com/john This page does not exist but in the title you'll see John | Electrolux How can i do this on my site?
Web Design | | evacuumstoreSEO0 -
Using "#" anchors to display different content
If I have a page that has an area on the page that acts like a widget and has three different tabs. These tabs provide 3 different types of information relevant to the page subject matter. By default when someone goes to the page one of the tabs is showing but you have to click on the others to see the info on them. Is it OK to use domain.com/topic#TAB1, domain.com/topic#TAB2, domain.com/topic#TAB3 to create shortcut links so that people can land on the page and have that predetermined tab showing. I'm wondering what search engines might think. Essentially all the content of all three tabs is there for people to see but they'd have to click to see the other tabs. I don't consider the content to be hidden. But I'd like to hear people's thoughts.
Web Design | | Business.com0 -
How do search engines interpret <hgroup>...</hgroup> tags?
Hi there. I'm building an HTML 5 site and through research of new HTML 5 elements I've seen little conclusive information about the interpretation of the new <hgroup>tag, in terms of SEO application and interpretation. In particular does Google interpret the nested heading tags as individual elements or does it combine them into one entity? For example, say I have: <hgroup> # Article Heading ## Article Sub-heading </hgroup> How is this interpreted by Google and what would be some good SEO best practices regarding the <hgroup>tag in HTML5: Is it interpretted as a single tag (" Article Heading: Article Sub-heading ") or two separate heading tags (one and one )? Also, how much does the ordering of the tags matter (say for example I wanted something like the following for visual purposes? <hgroup> ## Article Sub-heading # Article Heading </hgroup> One last thing: is it safe to assume that it is indeed OK to have multiple tags on a single page (as referenced by Matt Cutts a while back in a Webmaster Video)? Thanks! </hgroup> </hgroup>
Web Design | | LMDNYC2 -
Java-script slider & H1 tags
If you have a java-script slider on the homepage, each slide has an H1 tag heading, which of the H1 tags would google most likely consider? all of them or just the first one?
Web Design | | GraphicMail0