Need help? Check out our Support site, then


Altering alt tags in HTML post edit?

  1. My blog is image based, and I have been adding keywords in the title box when uploading images, to create alt tags to help Google searches. These keywords also appear as the alt tags (and title) in the HTML editor, i.e. as title = "keywords here" & alt = "keywords here"

    However, sometimes I remember a keyword I should have included in the title after I've posted the image. If I were to add an extra word in the HTML editor (after alt=), (as opposed to laboriously reuploading the image and retitling it), would doing this have any adverse effects in terms of the code not matching up with the media library code? I'm just worried that altering the code might cause a break in the link to the media library image.

    Thanks.

    http://imagemacros.wordpress.com/

  2. The best way to do it so that the change will not only be in the post but also in the media library is to open the post in the editor, click on the image, then click on the image edit button (mountain icon) that appears at the upper left of the image and then change it there and then click "update."

    You can also go into the media library anytime you want and edit the alt/title text for images. Click the show link for the image, make the change and then click save all changes.

  3. Thank you very much. I'll try this out now.

  4. You're welcome.

  5. I just tried the first method, adding an extra keyword to the title. The added word appears in the title HTML in the post editor, but not in alt HTML. However, the added word does appear when you hover the mouse over the image (I always thought this was the alt tags which showed, not the title words...)

    Is this sufficient for Google to find the added keyword (as I thought googlebots look specifically for alt tags)?

  6. There are issues with alt tags / title tags with some browsers so what wordpress does is to take the title tag and use it for both. IE as I remember is confused on alt and title tags.

    In the HTML for the "Oh you" post I see the same tag used as title and alt. Both are there.

  7. As long as there is an alt tag defined, google images will pick up the image and index it.

    BTW, I was viewing the source code on your page when I saw the identical alt and title tags.

  8. Yes, when I upload an image, and title it at the upload stage (I don't add a caption or description), the image title words and alt words are identical in HTML. When I edit after posting, using the first method you described, then they're not identical.

    Take the Wyatt Derp post. I've now added 'waistcoat' to the image title retrospectively, (just to give an example). Will Google bring it up as a result for 'waistcoat image macro', or ignore the word 'waistcoat' because it's in the title code, not alt code?

    http://imagemacros.wordpress.com/2009/07/25/wyatt-derp/

  9. p.s. the reason I want to get this exactly right is that I seem to be doing pretty well (so far, after two months) in terms of showing up high in Google (esp. the image search part) compared to other, much bigger, sites with some similar content. As well as inputting the actual text of the macro, I'm fairly sure that this is also a result of having better tagging. Therefore, it's important to me to get it right while there's still time to go back and adjust the posts I've made so far.

    Huge thanks for your help - your wordpress-fu is clearly awesome!

  10. Just to clarify this, all browsers use the "alt" tag; this tag is used by screen readers and crawlers.

    Now, for the tooltip that appears when you hover an image, IE uses the alt tag value to show it, which is not correct. Firefox uses the "title" tag for the tooltip which is correct.

    If you don't care about displaying the tooltip when someone (using other browsers but IE) hovers an image, then don't worry about the "title" tag; however, it is recommended that you do always use the "alt" tag.

    HTH

  11. @devblog, no I don't care what appears when you hover an image.

    However, I'm still unclear as to whether, when I add (after posting) a keyword to the title code of an image (as per thesacredpath's method), this is going to show up in Google searches.

    Sorry if I am being really thick here - you've probably already answered my question but I need it spelling out.

    And if it's not enough to amend the image title code - and I DO need to amend the alt tags - how do I do this without risk (if any) of breaking the link to the media library? Can I just insert an extra word in the HTML post editor?

  12. First off, I should know better: "alt" and "title" are not tags, they are attributes. It's Sunday, my brain is in sleep mode still...

    However, I'm still unclear as to whether, when I add (after posting) a keyword to the title code of an image (as per thesacredpath's method), this is going to show up in Google searches.

    The keyword won't appear right away after you added it, but the next time your blog is crawled by google, then it should be added to their index.

    how do I do this without risk (if any) of breaking the link to the media library? Can I just insert an extra word in the HTML post editor?

    I'm really not sure what you mean by "breaking the link to the media library". If you're using thumbnails, are you talking bout the link to the larger version of those thumbnails? if so, then you won't be breaking anything because you're not touching the "href" attribute of the "a" tag. Adding or deleting words from the "alt" attribute won't affect that link whatsoever.

    As I said before, for images it's always of good practice to use the "alt" attribute, so that's the one you should amend, and don't worry about the title attribute. If it was a text link, then "title" is the important attribute here.

    I recommend you reading this, it may clarify things more:

    http://fadtastic.net/2007/04/19/proper-use-of-alt-and-title-attributes/

  13. The keyword won't appear right away after you added it, but the next time your blog is crawled by google, then it should be added to their index.

    Okay, so altering the title code WILL have an impact - ultimately - on Google searches.

    I'm really not sure what you mean by "breaking the link to the media library". If you're using thumbnails, are you talking bout the link to the larger version of those thumbnails

    My blog is image-based, plus a tiny bit of text. If you look back at my first post, I was worried that manually altering the alt code in HTML post edit would - somehow - break the link to the image in the media library, because the codes wouldn't 'match'. Very probably a dumb question.

Topic Closed

This topic has been closed to new replies.

About this Topic