Header Tag Question
-
While reviewing code on a site, I found the following:
<h1 class="<a class="attribute-value">logo</a>"> <a id="<a class="attribute-value">logo</a>" href="[http://siteexampleh1.com](view-source:http://dmbinc.com/)"><span>Example of most important content on this page- Companyspan>a> h1>
Is this the correct way to place code for an h1 tag? The content is cached within the page and is hidden to the viewer. The content that is assigned as the h1, is a logo. Majority of code I have been reviewing does not use this setup. The code would instead read as (
This is heading 1
). Can anyone provide insights on this?
Thanks!
-
I agree with Garrett in that I would use the H1 tag to mark up a heading (e.g., an article title, not a link or image.) H1, H2, H3 tags (and so forth) are (textual) header tags, after all, by definition, and are meant to help crawlers understand how pages are organized. They are also very important in helping screen readers (often used by the visually impaired) understand how a page is organized. Not properly marking up pages can result in a very frustrating, and confusing experience for those who rely on screen readers to navigate the web. The WC3 explains how to mark up textual content in HTML very well.
While including the keyword in the H1 tag has little, if any value in terms of SEO, I think including it is good for usability -- for all users, not just those that use screen readers. When a user performs a keyword search, the search results show the keyword in the page titles. I think it confirms (for the user) that they are on the correct page (and have found what they are looking for) when one of the first things they see after clicking through to a page (from a search result) is a prominent headline containing the keyword in it.
-
You need the H1 to be visible for it to "count" - sure, you've got text here, but it's being hidden by the CSS, which is replacing that text with your image file.
You'd be much better off with a visible H1 headline containing text AND with your logo image being embedded with a standard image embed tag that ALSO has alt text for that image.
-
Hmmmm.
I wouldn't make an H1 tag a logo. I also wouldn't make the h1 tag a link. The h1 tag is one of the most important on page factors for targeting a keyword.
My suggestion would be to follow the example you gave in the paragraph,
This is a heading
Hope this helps,
~Garret
-
Hmmmm.
I wouldn't make an H1 tag a logo. I also wouldn't make the h1 tag a link. The h1 tag is one of the most important on page factors for targeting a keyword.
My suggestion would be to follow the example you gave in the paragraph,
This is a heading
Hope this helps,
~Garret
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Canonical Tags for Legacy Duplicate Content
I've got a lot of duplicate pages, especially products, and some are new but most have been like this for a long time; up to several years. Does it makes sense to use a canonical tag pointing to one master page for each product. Each page is slightly different with a different feature and includes maybe a sentence or two that is unique but everything else is the same.
Technical SEO | | AmberHanson0 -
Brand page meta tag
I have around 100 brands on my website (with 100 different pages.) Please suggest me best way to create meta tags for all brand pages.
Technical SEO | | Obbserv0 -
.htaccess redirect question
Hi guys and girls Please forgive me for being an apache noob, but I've been trawling for a while now and i can't seem to find a definitive guide for my current scenario. I've walked into a but of a cluster$%*! of a job, to rescue a horribly set up site. One of many, many problems is that they have 132 302redirects set up. Some of these are identical pages but http-https, others are the same but https-http and some are redirects to different content pages with http-http. A uniform redirecting of http to https is not an option so I'm looking to find out the best practice for reconfiguring these 302s to 301s within .htaccess? Thanks in advance 🙂
Technical SEO | | craig.gto0 -
Div tags vs. Tables
Is there any reason NOT to code in tables (other than it being outdated) for SEO reasons?
Technical SEO | | EileenCleary0 -
W3C html5 meta tags invalid?
Dear Mozers, we get errors when validating meta tags in html5. I know it's experimental and not all metas are valid, but how do you handle this? Leave the tags out? here are some examples: `…name="DC.title" content="my content...xyc.." /**>**` ``` `>` ``` `>` ``` `>` ``` `>` `>` I tried to find some information but couldn't. What would you do? Thanks a lot, Barbara
Technical SEO | | barbara-f0 -
URL Structure Question
Hey folks, I have a weird problem and currently no idea how to fix it. We have a lot of pages showing up as duplicates although they are the same page, the only difference is the url structure. They seem to show up like: http://www.example.com/page/ and http://www.example.com/page What would I need to do to force the URLs into one format or the other to avoid having that one page counting as two? The same issue pops up with upper and lower case: http://www.example.com/Page and http://www.example.com/page Is there any solution to this or would I need to forward them with 301s or similar? Thanks, Mike
Technical SEO | | Malarowski0 -
Title tag same text as H1?
What is the group's opinion on whether or not the <title>tag should have the exact same text as the <h1> tag on the same page? Obviously both should contain the phrase that page is optimized for but is it better to have them be variants of each other, or both the same and maybe equal to the key phrase that page is optimized for? Thanks.</p> <p>Example:</p> <blockquote style="background: none repeat scroll 0% 0% #f7f7f7; padding-top: 5px; margin-left: 0px; padding-left: 2px; padding-bottom: 5px; white-space: nowrap; overflow-y: auto; font-family: monospace;"> <p>title: los angeles blue widgets</p> <p>h1: los angeles blue widgets</p> </blockquote> <p>Or,</p> <blockquote style="background: none repeat scroll 0% 0% #f7f7f7; padding-top: 5px; margin-left: 0px; padding-left: 2px; padding-bottom: 5px; white-space: nowrap; overflow-y: auto; font-family: monospace;"> <p>title: los angeles blue widgets</p> <p>h1: blue widgets in los angeles</p> </blockquote> <p>Where the page is trying to optimize for "los angeles blue widgets"</p></title>
Technical SEO | | scanlin0 -
Canonical tags and internal Google search
Quick question: I want some pages that will have canonical tags, to show up in internal results for a Google site search that's built into the site. I'm not finished with the site, but is it correct to assume that pages with canonical will NOT show up in internal site search results, when powered by Google?
Technical SEO | | EricPacifico0