Is it bad (black hat) to have an H1 text as a text indent?
-
Is it bad practice to use a text indent through CSS for H1 text on a homepage(basically hiding h1 text)? I'm just trying to compensate for the fact that some text that should really be in the h1 tag is actually an image.
-
Thanks for the advice! That sounds like a good plan B if I can't get the developers to change the image to text. This is definitely one of the most avoidable yet most frustrating on page issues I encounter.
I guess it's time to update my documentation for development.
-
Thanks, I was just thinking that too, but I'd rather be safe than sorry.
-
Hi Mike,
I'd personally say that you're fine, depending how you impliment it.
I personally believe that as long as the text that you add reads what the image contains, you're fine.
SEOmoz even use image replacement!
Good luck!
-
Hi Mike, The text-indent property can be applied to block-level elements (P, H1, etc.) to define the amount of indentation that the first line of the element should receive. The value must be a length or a percentage; percentages refer to the parent element's width. A common use of text-indent would be to indent a paragraph:
**`P { text-indent: 5em }`**
The usage of
text-indent:-9999px
to display a site logo or other image while hiding text should be avoided. It’s a technique used by web spammers trying to game search engines like Google, and is considered spammy behavior. Instead, use an tag and put the text inside itsalt
attribute.According to Matt Cuts (and some other comments) the best solution is to use an image with
alt
andtitle
attributes. Thealt
attribute is for SEO and thetitle
attribute is for accessibility. Using an image also makes sense for semantic markup. A company logo is actually an important piece of content.**`# <a< span="">href="http://stackoverflow.com"> <img< span="">src="logo.png" alt="Stack Overflow" title="Click to return to Stack Overflow homepage" /></img<></a<>`**
<code>Well, recently, I'm thinking about SEO effects with using something like h1 {text-indent: -9999px; background: url('xyz') }...
I dont think I trust this anymore to be good for SEO. And I don't mean that it's actually "good" for it, because that would certainly be bad SEO techniques. I'm just thinking that it wouldn't be too far fetched to believe that in the search algorithms that anything that is negative text indent over ABC pixels, is considered spam and either isn't registered, or even worse, effects your site negatively.</code>Hiding the contents of an H1 tag, such that the search engine is presented with textual content which is not visible to a visitor, is SEO Spamming, and can get the site banned if one of your client's competitors catches you doing it and turns you in! It is, in fact, a form of hidden text spamming (itself "Black Hat", and explicitly banned by all of the major search engines). With the offense made all the worse by the fact you are doing it with an H1 tag, rather than non-emphasized text (Due to both the power of an H1, and the real estate it would take-up if rendered on-screen) Google makes it pretty clear that hidden text spamming is prohibited. In fact, they have a web page in their anti-spam guidelines devoted to it! They also have a check-off box (the first one, in fact!) on their spam report page specifically dedicated to reporting this kind of spamming (see 3rd link - requires login). The fact that Google may not explicitly list every means of hiding keywords does not therefore make a particular spamming technique legit. Indeed, as Google states in their Webmaster guidelines (see 1st link) - "It's not safe to assume that just because a specific deceptive technique isn't included on this page, Google approves of it." However, in this case, this method of hiding content is specifically prohibited. On their Hidden Text Spamming page (2nd link), Google lists examples of various tricks to hide content, including specifically - "Using CSS to hide text" Which is what you are proposing to do here. While implementing this with external CSS files MAY make this a bit harder for Google to detect via automated means, it is also a VERY easy technique for someone to spot. All it takes is for just ONE of your client's competitors (OR their SEO's) to wonder why the site is coming-up higher in the SERPs than they are, notice what you are doing, and turn you in to Google for spamming! Any short-term gain you may obtain from such a technique is not worth the risk of getting your client's site banned from Google. The original quote from the WebmasterWorld discussion referenced by the Search Engine Roundtable link Shaq Ali provided makes the following excellent point - "For those who may be hiding things through CSS or negatively positioning content off screen to manipulate page content, I surely wouldn't do that with any long term projects. ;) The penalty for getting busted using this technique I would imagine is a PERMANENT BAN.* No if's, and's, or but's, you're history. You'll need a pardon from the Governor to be reconsidered for inclusion. ;)" (* - Bold replaced with caps) #### Links: * [http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35769](http://www.linkedin.com/redirect?url=http%3A%2F%2Fwww%2Egoogle%2Ecom%2Fsupport%2Fwebmasters%2Fbin%2Fanswer%2Epy%3Fhl%3Den%26answer%3D35769&urlhash=woHy "New window will open") * [http://www.google.com/support/webmasters/bin/answer.py?answer=66353](http://www.linkedin.com/redirect?url=http%3A%2F%2Fwww%2Egoogle%2Ecom%2Fsupport%2Fwebmasters%2Fbin%2Fanswer%2Epy%3Fanswer%3D66353&urlhash=e5Vy "New window will open") * [https://www.google.com/webmasters/tools/spamreport](http://www.linkedin.com/redirect?url=https%3A%2F%2Fwww%2Egoogle%2Ecom%2Fwebmasters%2Ftools%2Fspamreport&urlhash=UReX "New window will open") I hope that your query had been solved.
-
If he put the image within the h1, and set the alt text to what he wanted the H1 would that help? It wouldn't be ideal but it could be a workaround that would yield some results.
I agree the design should encompass the proper tags, especially the H1 and H2.
-
Hiding text through CSS is against Google's TOS. So basically it can be classified as "black hat".
Your H1 should tell your users what your page is about, if you have to hide it for whatever reason, there may be something wrong with your design.
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
-
Can a H1 Tag Have Multiple Spans Within It?
H1 tags on my client's website follow the template [Service] + [Location]. These two have their own span, meaning there are two spans in an H1 tag. class="what">Truck Repair near class="where">California, CA How do crawl bots see this? Is that okay for SEO?
Technical SEO | | kevinpark1910 -
Disavowing Links: Over-optimized Anchor Text
If a site has been effected by Penguin, and the main issue is over-optimized anchor text. Would the disavow file take care of this? If there is a no-follow added to the link when Google next crawls the site, wouldn't you still have the optimized anchor text in your profile?
Technical SEO | | inhouseseo0 -
Pointing Other URL to My Site? Good or bad for ranking.
A few years ago I purchased a few keyword rich domain names and set up some satellite sites. Spammy I now know. What should I do now? I own the domain names for at least another 3 years. Should I point them to my main site or would that hurt my main site ranking?
Technical SEO | | caisson0 -
Bad link profile?
Hi Mozzers! We have recently been handed this client due to the former SEO company building up a bad link profile, which resulted in the site dropping off the search results all together. Forcing them to get a new domain. This happened in July last year and we are unsure whether it would be wise to submit a reconsideration request and then 301 their old sites pages to the new domain. Basically I'm asking whether you can spot any spammy links being built in their profile. Here is the old domain: http://www.claimssolicitors.co.uk/ It would be great if you could help me out! 🙂 Thanks
Technical SEO | | Webrevolve0 -
Is it bad to have your pages as .php pages?
Hello everyone, Is it bad to have your website pages indexed as .php? For example, the contact page is site.com/contact.php and not /contact. Does this affect your SEO rankings in any way? Is it better to have your pages without the extension? Also, if I'm working with a news site and the urls are dynamic for every article (ie site.com/articleid=2323.) Should I change all of those dynamic urls to static? Thank You.
Technical SEO | | BruLee0 -
Google Cache Version and Text Only Version are different
Across various websites we found Google cache version in the browser loads the full site and all content is visible. However when we try to view TEXT only version of the same page we can't see any content. Example: we have a client with JS scroller menu on the home page. Each scroller serves a separate content section on the same URL. When we copy paste some of the page content in Google, we can see that copy indexed in Google search results as well as showing in Cache version . But as soon as we go into Text Only version we cant see the same copy. We would like to know which version we should trust, Google cache version or the TEXT only version.
Technical SEO | | JamesDixon700 -
If two links from one page link to another, how can I get the second link's anchor text to count?
I am working on an e-commerce site and on the category pages each of the product listings link to the product page twice. The first is an image link and then the second is the product name. I want to get the anchor text of the second link to count. If I no-follow the image link will that help at all? If not is there a way to do this?
Technical SEO | | JordanJudson0 -
Hiding text with Javascript and a more button
I am considering putting a block of text on may pages, that initially appears as a snippet with a 'show more' button that expands to show the whole lot. Question: If the search engines can see the whole lot, but the visitor only sees the snippet until they click 'show more' then is this cloaking? Is it a really bad idea? Or can I get away with it because I am not being deceptive just improving the design? Help!
Technical SEO | | mascotmike0