• Hi,

    How to I add the image alt and image title attributes to the header image in my wordpress theme? I know when writing html, it’d look like this:

    <img src=”/image.jpg” alt=”alt text here” title=”title text here”>

    However, with the wordpress theme, the image is in the css file.

    So, how do I add in alt and title attributes?

    Thanks!

Viewing 1 replies (of 1 total)
  • you cannot apply title and alt to background images. The function would be irrelevant too: alt is used for browser not able to display images, and background images aren’t displayed anyway in such browsers. Title is for screen readers (and possibly SEO reasons). If you want to accomplish these, you’re better of creating a title in html, and move it out of the screen with ‘text-indent: -9999px;

    Peter

Viewing 1 replies (of 1 total)
  • The topic ‘adding image alt and image title attributes to header….’ is closed to new replies.