Welcome to WebmasterWorld Guest from 54.160.163.163

Forum Moderators: ergophobe

Message Too Old, No Replies

href's within H tags?

     

Lynque

3:14 pm on Feb 20, 2009 (gmt 0)

10+ Year Member



I wasn't really sure where to post this question so - foo it is :)

We are having a discussion around the office regarding the SEO impact of having our Header tags be clickable and I thought I'd ask the WebmasterWorld community what their thoughts are on the topic.

<H1><a href="mypage.htm">My Title</a></H1>

I know it isn't w3 compliant but would this have a positive or negative SEO impact?

rocknbil

3:52 pm on Feb 20, 2009 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Who says it's not w3C compliant?

As is, it validates fine in HTML.

If you are using XHTML, which you should only do if you need to use XHTML features, the only thing invalid there is H1 is in caps and needs to be h1.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- doctype on one line of course -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Untitled</title>
</head>
<body>
<h1><a href="mypage.htm">My Title</a></h1>
</body>
</html>

Validates fine. This will probably get moved to HTML/Browsers or accessibility, somewhere in there . . . . but don't see a real problem with this approach. See recent related discussion [webmasterworld.com]

choster

10:51 pm on Feb 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can think of no justification for a hyperlink inside an <h1>.

The <h1> is the top-level heading on the page. What would it be linking to except itself? If you have multiple <h1>s or if they don't encapsulate the main topic of the page, your semantics are off. That can potentially throw off screen readers— and search engines— which is presumably why this thread was moved to the Accessibility & Usability forum.

pageoneresults

11:04 pm on Feb 20, 2009 (gmt 0)

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I can think of no justification for a hyperlink inside an <h1>

I can't either, it just doesn't seem correct but it is allowed.

<h2> thru <h6> yes, but not <h1>.

Where would you link it to? Same page? Nah, can't do that.

phranque

1:26 am on Feb 21, 2009 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



i could see a case for linking to a fragment identifier on the page.
for example a page displaying the header element followed by a large image followed by the relevant text.

bedlam

4:27 am on Feb 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It doesn't seem like such a strange use case to me...what about something like this?

<h1><a href="/obama.html" title="About Barack Obama">Barack Obama</a> Elected!</h1>

The hypothetical document with the above heading is a document about somebody getting elected, while the linked page is perhaps a document detailing the subject's biography or CV...*

--b

*Admittedly, the link text in the example above is not that great, but I think the principle is sound...

Lynque

2:35 pm on Feb 21, 2009 (gmt 0)

10+ Year Member



Perhaps using the H1 as the example was misleading, I agree that the H1 on page "should" be specific to the page that it resides on.
While H2's thru H6's can link out to other relevant pages.

g1smd

1:02 am on Apr 25, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



A heading usually sits above, and introduces, the following paragraph, list, table, form, or image (or combination of).

There's little reason for it to link to some other page.

piatkow

9:03 pm on Apr 28, 2009 (gmt 0)

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



I would put an anchor tag on an h1 but just with a name attribute for a "return to top" link. For "h" tags more generally I can't see why it should be an issue although I would typically link from content underneath a header rather than for the header itself.

g1smd

9:56 pm on Apr 28, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



That's fine. It links to same page. Main discussion was about linking to a different page.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month