img title attribute

  • Unknown's avatar

    The title attribute is stripped from my code when I try to use it to describe a photo. It is used by WP in a href for a thumbnail. I want to use the title attribute because Firefox and several other browsers render the alt attribute as it is meant to be rendered ie: it describes an image in browsers that do not display images. The W3C recommendations say to use the title attribute in conjunction with the alt attribute. The alt will display when images don’t and the title will display on mouse-over.

  • Unknown's avatar

    Best bet would be to submit a feedback. It’s been brought up before.

    You should be able to manually add it in once the picture is in the editor.

  • Unknown's avatar

    I left a feedback prior to making the post here. But I found a work-around. After you upload the image, if you select Link to None and then go into the Code tab and add the title attribute in the img tag, WP will remove the title. So, select Link to File, go into the Code tab and place the title attribute in the a href tag. Too bad you have to use a work-around in order for browsers that strictly follow W3C recommendations to work. Also too bad IE will work with sloppy code. But then MS does need it to work with Front Page, don’t they.

  • Unknown's avatar

    In widgets at least, I found that the routine that strips non-allowed content out is sensitive to the order in which the elements appear. This, for example, works:
    <img src=”http://creativecommons.org/images/public/somerights20.png” style=”border-width:0;” alt=”Creative Commons License” />
    where this does not:
    <img alt=”Creative Commons License” style=”border-width:0″ src=”http://creativecommons.org/images/public/somerights20.png”/>
    I wonder if this is the problem here?

  • Unknown's avatar

    Ozrisk, what get’s stripped?

  • Unknown's avatar

    drmike,
    I copied the second of those from the CC website. When I put it into a text widget with the alt argument first and the src argument was stripped. I knew it had to work as it did with the clustrmap. I rearranged it to the first and it worked.

  • The topic ‘img title attribute’ is closed to new replies.