I will be creating a fixed navigation for my website and in their will be a logo that contains the company name along with some icon. Since the company name is in the logo itself it seems pointless to use an header tag in my HTML. But I want search engines to see my company name in my h1 tag for seo purposes. Would using the css property value display:none; on the h1 element be a solution to this?
3
Answers
I’d suggest to have the image as a
background-image
ofh1
. You can still add text but you can style it withfont-size: 0
or use a negativetext-indent
to hide your text.alt attribute of
img
is exactly for that: describing content of image to bots, screen readers etc.Google explicitly says that they are using it when parsing websites:
You can use this construction:
Alt text acts as the content of the h1.