DEdesigns57 DEdesigns57 - 3 months ago 8
CSS Question

How do I use a logo that contains the company name on a website and still make use of <h1> tags?

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?

Answer

You can use this construction:

<h1>
  <img src="logo.png" alt="My company name">
</h1>

Alt text acts as the content of the h1.

Comments