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
-
Does anyone have data on the effect of multiple H1 tags on a page?
One of my website's sub-domains is fed information from a job board master-template, thus my site (and hundreds of other sites) is just branded styling pulling from one external source. Because of the way this master template is set up (not very concerned with SEO best practices), I have found the need to hide the H1 coming from the master template, and display a new separate H1 in my styling. This is being done with user-experience in mind, but how will search engines respond to having two H1s (one hidden, one visible) on a page? I understand that a single H1 is usually ideal, and hidden page components are typically frowned upon because they don't add user value... but in this case, the hidden component is solely for the benefit of the user. I would like to find the best balance of SEO and UX, so I am very interested in any experimental data or case studies on a similar situation.
Web Design | | pbailey0 -
Wordpress SEO/Tag plugin recommendation for sports (soccer) website
I own a Wordpress website which covers soccer in the DC MD VA area called DMV Soccer http://www.dmvsoccer.com/ We write weekly recaps where we tag a player who has scored a goal or performed well in a game. For each player, obviously, a tag is created. What I'm looking for is a plugin or solution that would allow me to tag a player, but also automatically assign a team to that player so that the team name and player's name are optimized on the individual player's tag page. So if I were to tag George Murphy on a recap, and I assign him to a team, let's say DC United. The tag page would have a title, something like: George Murphy Soccer Player for DC United and the meta description: George Murphy, soccer player from MD who players for DC United archives Or something similar, if that makes sense. Should I skip using tags and instead start assigning each player as a sub-category under each team? I'd like to try to avoid that, because not each category will be based on a player. Any suggestions in terms of existing plugins or other recommendations?
Web Design | | georgetsn1 -
Uses for Fiverr?
Hi,
Web Design | | ChrisHolgate
I'll keep this really short and sweet... I'm just intrigued more than anything. With the exception of user testing has anybody ever had a good experience with Fiverr? Obviously I'm not contemplating SEO services for $5 but I'm just curious as to whether anybody has found any services that were genuinely useful in a day to day capacity?2 -
Above the Fold Content - Use of large images
Hi All, Our designers have come to the SEO team to ask if have a large image across the top of the page taking up a large majority of the above the fold real estate will impact our SEO. Our initial thoughts are no as long as we have an optimised H1 visibal to the user landing there which informs them what the page is about. Any thoughts would be appreciated.
Web Design | | J_Sinclair1 -
Using a query string for linked, static landing pages - is this good practice?
My company has a page with links for each of our dozen office locations as well as a clickable map. These offices are also linked in the footer of every page along with their phone number. When one of these links is clicked, the visitor is directed to a static page with a picture of the office, contact information, a short description, and some other information. The URL for these pages is displayed as something like http:/example.com/offices.htm?office_id=123456, with seemingly random ID numbers at the end depending on the office that remain static. I know first off that this is probably bad SEO practice, as the URL should be something like htttp://example.com/offices/springfield/ My question is, why is there a question mark in the page URL? I understand that it represents a query string, but I'm not sure why it's there to begin with. A search query should not required if they are just static landing pages, correct?. Is there any reason at all why they would be queries? Is this an issue that needs to be addressed or does it have little to no impact on SEO?
Web Design | | BD690 -
Web Developer Using Stock Photos
Hello, The organization is selling a cms system in a niche market across the country. It has the normal SEO challenges, in addition he is using purchased stock images. This seemed ok, while he was smaller but now we are growing rapidly and these images are VERY STOCK- and well used ( I have checked with Tiny Eye). I remember a few years ago this was a flag to the search engines who went through manual review, is this still true? It seems to me that the theme's that come with the images, are duplicated ( including navigation & footers), so having the duplicated images would be another negative. Thank you for your suggestions!
Web Design | | TammyWood0 -
Does it do harm if you add a rel="canonical" tag on a page that doesn't need it?
If a page is clearly unique and there is obviously no canonical tag needed, does it hurt anything if one has been added?
Web Design | | jaychow0 -
Canonical Tag
I've been helping someone out with their website, and I noticed the person who built the site made the canonical tags like this:
Web Design | | StandUpCubicles
href="http://www.example.com/" rel="canonical" /> I'm use to seeing it how seomoz does it: Does this matter? Is it ok to have it inverted? They also have another canonical tag in there like this:
var hs_canonical_url = "http\x3A\x2F\x2Fwww.example.com\x2Fhome" Any idea what that is? Could it be hurting the site?0