homepage Welcome to WebmasterWorld Guest from 23.23.12.202
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Accessibility and Usability
Forum Library, Charter, Moderators: ergophobe

Accessibility and Usability Forum

    
href's within H tags?
Lynque

5+ Year Member



 
Msg#: 3854135 posted 3:14 pm on Feb 20, 2009 (gmt 0)

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

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



 
Msg#: 3854135 posted 3:52 pm on Feb 20, 2009 (gmt 0)

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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3854135 posted 10:51 pm on Feb 20, 2009 (gmt 0)

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

WebmasterWorld Senior Member pageoneresults us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3854135 posted 11:04 pm on Feb 20, 2009 (gmt 0)

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

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



 
Msg#: 3854135 posted 1:26 am on Feb 21, 2009 (gmt 0)

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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3854135 posted 4:27 am on Feb 21, 2009 (gmt 0)

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

5+ Year Member



 
Msg#: 3854135 posted 2:35 pm on Feb 21, 2009 (gmt 0)

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

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3854135 posted 1:02 am on Apr 25, 2009 (gmt 0)

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

WebmasterWorld Senior Member piatkow us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3854135 posted 9:03 pm on Apr 28, 2009 (gmt 0)

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

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3854135 posted 9:56 pm on Apr 28, 2009 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Accessibility and Usability
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved