• Resolved jmkt

    (@jmkt)


    I am getting the error message ” An img element must have an alt attribute” in reference to my logo which I uploaded from my pc. I have since been to my media library and added an alt statement for that image. I have saved but there is no difference. Can anyone suggest what is wrong?

    Site is here is you need to check html.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Looks like I forgot to add an ALT to the the logo code in the header.php….so one will have to be added.Normally I would say use a child theme for this, but I am going to be doing another update to this theme and the ALT will be added, so you might as well edit the header.php file directly for this one as it will be done in the update.

    Look for this code:

    <img src="<?php echo get_option( 'my_logo' ); ?> "/>

    and add the ALT to this code like this:

    <img src="<?php echo get_option( 'my_logo' ); ?>" alt="<?php bloginfo( 'name' ); ?>" />

    Thread Starter jmkt

    (@jmkt)

    Many thanks. That worked a treat.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Invalid Markup Validation W3C’ is closed to new replies.