Switching H1 text with a logo image

0 votes
Feb 26 in Others by Kichu
• 16,850 points
109 views

1 answer to this question.

0 votes
<h1>
  <a href="http://stackoverflow.com">
    <img src="logo.png" alt="Stack Overflow" />
  </a>
</h1>
you missed this option 
or try this solution 
<h1 id="logo">
  <a href=""><span>Stack Overflow</span></a>
</h1>
/* position code, it may be absolute position or normal - depends on other parts of your site */
#logo {
  ...
}

#logo a {
   display:block;
   width: actual_image_width;
   height: actual_image_height;
   background: url(image.png) no-repeat left top;
}

/* for accessibility reasons - without styles variant*/
#logo a span {display: none}

answered Feb 27 by narikkadan
• 7,860 points

Related Questions In Others

0 votes
1 answer

Parsing a string with GetOpt::Long::GetOptions

Hey, have a look at the section ...READ MORE

answered Nov 15, 2018 in Others by nirvana
• 3,130 points
636 views
0 votes
1 answer

Execute a shell script with php

One of the possible reason for this ...READ MORE

answered Feb 24, 2019 in Others by Omkar
• 69,190 points
5,708 views
0 votes
1 answer
0 votes
0 answers

Replacing H1 text with a logo image: best method for SEO and accessibility?

i want to link my logo to ...READ MORE

Feb 14 in Others by Kichu
• 16,850 points
295 views
0 votes
0 answers

seo - images and h1

I like to have logos instead of ...READ MORE

Mar 9 in Digital Marketing by Kichu
• 16,850 points
23 views
0 votes
0 answers

H2 comes before h1 in source, Is it ok?

IF i use <h2> for left sidebar ...READ MORE

Mar 11 in Digital Marketing by Kichu
• 16,850 points
43 views
0 votes
1 answer

Render HTML to an image

To answer your question, there are a ...READ MORE

answered Feb 8 in Java by Soham
• 8,730 points
192 views
0 votes
1 answer

Replacing H1 text with a logo image: best method for SEO and accessibility?

<h1> <a href="http://stackoverflow.com"> ...READ MORE

answered Feb 21 in Others by narikkadan
• 7,860 points
15 views
0 votes
1 answer

Problem with yoast SEO

This is (probably) not a problem of ...READ MORE

answered Feb 10 in Others by narikkadan
• 7,860 points
22 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP