![]() | | ||||||||
| | #1 |
| CEO of BoltWebHosting.com War Room Member Join Date: Feb 2011 Location: Vancouver, Canada
Posts: 526
Thanks: 53
Thanked 113 Times in 93 Posts
|
We're doing a major redesign of our site right now to make it more seo-friendly, and an interesting question has risen. We are going to have some hyperlinked header tags on some pages, and I'm trying to figure out if we should have the hyperlink inside or outside of the header tags. Example 1: HTML Code: <h1><a href="somewhere.html">Some Important Topic</a></h1> HTML Code: <a href="somewhere.html"><h1>Some Important Topic</h1></a> We've always done it as shown in Example 1, but I'm curious to know if it would be better to go with Example 2 instead. Both are valid in HTML and such, but what will make it more Google-friendly? Most wordress themes and other websites I've ever looked at seem to go with Example 1 as well. So I'm inclined to think that's the better way of doing it. |
| [WSO] Amazing Web Hosting Discounts Exclusive to Warriors Providing quality, fast, and secure web hosting services since 2009 Bolt Web Hosting provides Shared Web Hosting, Reseller Web Hosting, and VPS Hosting services. | |
| | |
| | #2 |
| Senior Warrior Member War Room Member Join Date: Jun 2010 Location: Minnesota
Posts: 1,104
Thanks: 16
Thanked 117 Times in 87 Posts
|
I use example number 1. No real explanation why.
|
| | |
| | |
| | #3 |
| Warrior Member Join Date: Apr 2011
Posts: 9
Thanks: 0
Thanked 2 Times in 2 Posts
|
Example no 1
|
| | |
| | |
| | #4 |
| CEO of BoltWebHosting.com War Room Member Join Date: Feb 2011 Location: Vancouver, Canada
Posts: 526
Thanks: 53
Thanked 113 Times in 93 Posts
|
It's Example 1. I was talking to somebody about it last night after posting the question here, and they told me that Example 2 is invalid HTML. I put together a test page and checked it with the W3 validator, and it is indeed invalid HTML. Apparently HTML standards don't allow you to have an H tag inside of a hyperlink, even though it does work. Having the hyperlink inside the H tag appears valid to the W3 validator though. |
| [WSO] Amazing Web Hosting Discounts Exclusive to Warriors Providing quality, fast, and secure web hosting services since 2009 Bolt Web Hosting provides Shared Web Hosting, Reseller Web Hosting, and VPS Hosting services. | |
| | |
![]() |
|
| Tags |
| header, hyperlinked, order, proper, tags |
| Thread Tools | |
| |
![]() |