How To "Hide/Mask" Your H2 Titles in Wordpress

by zannix
4 replies
  • WEB DESIGN
  • |
Howdy Warriors!

I'm very new to html but I was wondering if any of you could help me with my problem.

I want to have an h2 tag on my website with my keyword in it, but only for the SEO purposes (I don't want the actual users to pay attention to it).

First, I had 2 options in mind:

-Option one:

Change the font size of h2 tags to the text font size and insert the keyword in h2 tags inbetween ordinary text. This did not work however, because Wordpress kept pushing the h2 tag into separate line and wouldn't integrate it with the text.

- Option two:

Change the font size of h2 tags to really small, select white color and put it somewhere on the page, so the users won't be able to see it, but the spiders will. This is a "BlueFart" technique however, and I don't know if search engines will punish me for doing this...

Anyway - is there any convinient way I can achieve this without the users actually seeing the h2 tag stick out on my page?

I'm asking this because I have a web-page which really needs no text, so I'm trying to keep it to minimum, yet still optimizing the on-page factors.

Thank you!

EDIT: Is it possible to put an image as your h2 title? And set the image alt text as the h2 title? Does this cary the same weight as ordinary text in h2 tags?

Like this:

<h2>
<a href="http://WEBSITE.com">
<img src="logo.png" alt="h2 alt text" />
</a>
</h2>
#hide or mask #titles #wordpress
  • Profile picture of the author Istvan Horvath
    This is a "BlueFart" technique however, and I don't know if search engines will punish me for doing this...
    Yes, they will screw you big time!

    The whole idea is... how to put it mildly? - not-so-bright, so forget it!
    Signature

    {{ DiscussionBoard.errors[5210264].message }}
  • {{ DiscussionBoard.errors[5211620].message }}
  • Profile picture of the author Jason Z
    What you're talking about doing, especially with the image is a common practice that we do for image replacement on title tags. I do it a lot with an h1 tag for a site logo being replaced with a logo but having the keyword rich site title for search engines.

    The best way to do it is this:

    HTML
    <h2 class="title"><a href="my.link">This is my title</a></h2>

    CSS
    h2.title {background: url(images/my-graphic.jpg) no-repeat; width: 100px;height:100px;}

    h2.title a{height:100px;width:100px;display:block;text-indent:-9999px}

    Obviously yuou'll have to make the heights and widths to those of the image of you are using and also the links and urls and class to the ones you are using.

    But that's how you'd do an image replacement technique. I disagree with anyone who says you get punished for doing this by search engines. I have never seen a problem with this and it has been a fine technique for me.
    Signature
    Co-Founder of the Local Profit Model Training Program for Offline Consultants

    Jason Zimmerman is an offline marketing and consulting professional. He has been developing web sites and digital marketing plans for local businesses since 2000.
    {{ DiscussionBoard.errors[5213433].message }}
    • Profile picture of the author zannix
      Originally Posted by Jason Z View Post

      What you're talking about doing, especially with the image is a common practice that we do for image replacement on title tags. I do it a lot with an h1 tag for a site logo being replaced with a logo but having the keyword rich site title for search engines.

      The best way to do it is this:

      HTML
      <h2 class="title"><a href="my.link">This is my title</a></h2>

      CSS
      h2.title {background: url(images/my-graphic.jpg) no-repeat; width: 100px;height:100px;}

      h2.title a{height:100px;width:100px;display:block;text-indent:-9999px}

      Obviously yuou'll have to make the heights and widths to those of the image of you are using and also the links and urls and class to the ones you are using.

      But that's how you'd do an image replacement technique. I disagree with anyone who says you get punished for doing this by search engines. I have never seen a problem with this and it has been a fine technique for me.
      Thanks man! Just what I was looking for!
      {{ DiscussionBoard.errors[5214284].message }}

Trending Topics