View Full Version : Help with HTML code

12-03-2010, 03:54 AM
I added an image on my home page and was going to add an alt tag to it. The only way I can add an alt tag is to use an HTML code. I don't know how to write anything in HTML. Would someone be willing to write the code for me?


12-03-2010, 09:11 AM
<img src="insert the url of your image here" alt="insert your alt tag text here" />

Don't forget that last back slash, because that closes out the tag.

P.S. If you are using some kind of content editor and it is creating the image code for you - then view your code and look for a tag that looks like the one above and add the alt="text goes here" inside the brackets like I did above: <img in here! />

12-04-2010, 03:46 AM
Thanks, but I couldn't get it to work. I'm sure I'm doing something wrong on inputing it, but the support site has been down for 2 days now so I can't look up exactly where to enter it.

12-04-2010, 11:14 AM
I don't know if what is happening to you is what happened to me with a Wordpress.com site. There are two ways to construct the page

- a plain editor - a wysiwyg application (what you see is what you get.) No code required, it's all done for you.
- an htnl editor - where you can enter html code.

What I found happening was, if I wrote something in the plain editor it looked okay. Then, when I wanted to add something that required some html code, opening the already written stuff in the html editor messed it up. It also seemed to have a mind of its own and undid things I wanted to do, rewrote some things that I had entered, and so on.

I finished up ignoring the plain editor and writing everything in code into the html editor. I could only make it work well if I did everything in the plain editor or eveything in the html editor but not mix them.

I don't think that's how it's supposed to work but that's how it worked for me. If that is happeninng to you, Jo Ellen, that may be the reason.

Harold Mansfield
12-04-2010, 12:02 PM
<img src="insert the url of your image here" alt="insert your alt tag text here" />

Don't forget that last back slash, because that closes out the tag.

That's pretty much it for the alt tag. There's not a whole lot more to it.
Now a title tag (the text that pops up when you hover over it) is a different thing. For that you just add title="what ever you want it to say"/>

12-04-2010, 12:58 PM
Huh? I never saw a title tag associated with an img but when I hover over an image with an alt tag filled out, that text pops up when you hover over it, too.

Harold Mansfield
12-04-2010, 01:25 PM
Alt text is meant to be an alternative information source for those people who have chosen to disable images in their browsers and those user agents that are simply unable to “see” the images. It should describe what the image is about and get those visitors interested to see it.
Without an alt text an image will be displayed as an empty icon: without alt In Internet Explorer Alt text also pops up when you hover over an image. Last year Google officially confirmed that it mainly focuses on an alt text when trying to understand what an image is about.

Image title (and the element name speaks for itself) should provide additional information and follow the rules of the regular title: it should be relevant, short, catchy and concise (a title “offers advisory information about the element for which it is set“). In FireFox and Opera it pops up when you hover over an image:

I guess they function differently in different browsers.

12-04-2010, 04:10 PM
Well, I'm not going to worry about not getting it to work in my current website and spend my time working on getting my new website in WP going. But, thanks for everyones help.

01-18-2011, 02:24 PM
Hi there james just saw this post today and i know a couple tutorial sites that might help

1. w3schools.com
2. htmlatoms.com

the first one is more indepth with what you might need and the second might just help figure the quick solution
let us know how it goes and dont give up Edison learned 2000 ways not to make a light bulb before he learned the one way to

01-18-2011, 06:59 PM
Huh? I never saw a title tag associated with an img but when I hover over an image with an alt tag filled out, that text pops up when you hover over it, too.

This is an old thread now, which I obviously missed when it was fresh, but since no one every answered Frederick's question, I figured I would do that even though I'm late to the party.

The alt text on hover only works in IE (if other browsers do this, I'm not aware of it). In order for that text to appear on all browsers, the title attribute must be used. It can be an exact duplication of the alt attribute, but it doesn't have to be. If the title is different than the alt, even IE will display the title contents.

The alt text is to describe the image. The title can be thought of as a caption. The two are not always the same. An example of when they might be different is if you use the image to link to a different page. Suppose you have a family reunion pic you're talking about on one page but providing more detail on another page. Your image link could be set up like this:

alt="A group picture at our family reunion" title="Click to see more of the family reunion"

01-18-2011, 11:42 PM
Really? That sounds rather useful, plus might add a tiny bit of SEO juice, too. I will start using that. Thanks.

01-19-2011, 12:15 AM
Yes, it can add some SEO juice, but should be used cautiously for that purpose. The main reason to use alt text is for screen readers used by site impaired people. The text tells them about the image. If you think of it from that perspective, it will help you use it properly. If the alt text sounds like a lot of keyword stuffing that would be annoying to hear a screen reader go through, the search engine bots could get annoyed too. Keywords should be used, but not at the cost of artificially inflating their use.

Titles are best kept short because they only appear for a few seconds when hovering over the image.