Viewing 8 replies - 1 through 8 (of 8 total)
  • Well, the first code should look like this:

    <img src="http://www.thesandinista.com/wp-content/themes/feed-icon.gif" style="border:0;" alt="" /> – you need a space before the /, and while it’s not necessarily “perfect”, a blank alt is better than none, and I *think* you need the semi-colon after the 0.

    Don’t know why it would be valid without in the original and not yours, but give it a shot.

    Thread Starter atljogger

    (@atljogger)

    So this exactly as written (meaning not an actual symbol for ‘alt’:

    ” title=”Subscribe to my feed”><img src=”http://www.thesandinista.com/wp-content/themes/feed-icon.gif&#8221; style=”border:0;” alt=”” />

    Either learn how to post code (look below the text input area for instructions) – or post your code to http://wordpress.pastebin.ca
    Nobody can read it here because it renders!

    Exactly as I posted.

    Thread Starter atljogger

    (@atljogger)

    http://wordpress.pastebin.ca/311364 This is what my final code looks like. Thanks.

    That looks right. If it were me, I’d take out the border declaration, and set the following in your css:

    img, img a {
    border:none;
    }

    Now, try validating it and see if you get the same errors. If so, then I’m stumped….

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Maybe this is just me, but didn’t the error that the validator actually gave you tell you exactly what you needed to know?

    Error Line 112 column 168: required attribute “alt” not specified.” “The attribute given above is required for an element that you’ve used, but you have omitted it. For instance, in most HTML and XHTML document types the “type” attribute is required on the “script” element and the “alt” attribute is required for the “img” element.

    Like it says, an img tag requires the alt attribute. If you have an <img src="whatever" />, then that’s not enough. You must give it alt text, like <img src="whatever" alt="description of whatever" />.

    Alt text is mandatory. Why? Because not every browser renders images.

    Well, true Otto, to a point. Validation won’t throw an error with a blank alt, though might pop a warning. Thing is, when you’re using dynamic image stuff (like the galleries etc. do on the fly) you can’t give them specific alts (well, you could, if you knew how to tell it to use the image name as the alt; I don’t….)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Adding an RSS feed button – need HTML help’ is closed to new replies.