Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As I understand, pages should have only 1 h1 tag as per Google (http://stackoverflow.com/questions/503925/is-it-alright-to-use-multiple-...), but I notice you put the site name in an h1 tag.
Also, the bootstrap example does not use h1 for site name: http://getbootstrap.com/2.3.2/components.html#navbar
Comment | File | Size | Author |
---|---|---|---|
#4 | bootstrap-h1-duplicated-2100723-3.patch | 12.38 KB | albertomota |
#2 | navbar_h1_to_brand-2100723-2.patch | 1.72 KB | heylookalive |
Comments
Comment #1
markhalliwellAgreed, this is bad practice. In regards to "why" it's this way, who knows. It's probably just legacy code that I haven't really paid attention to since being brought on board.
Comment #2
heylookalive CreditAttribution: heylookalive commentedFound 10 free minutes, find attached a patch.
I've moved the code up a bit in line with bootstrap docs, also making use of ".navbar-left" and also ".navbar-btn" to get the vertical alignment right, not sure if we should create our own class to do this but it looks about right with that class.
Comment #3
markhalliwellThanks @heylookalive!
Committed 94919c0 to 7.x-3.x.
Committed 71c271e to 7.x-3.x.
Needs backport to 7.x-2.x now.
Comment #4
albertomota CreditAttribution: albertomota commentedBackported, patch attached.
Comment #5
imadalin CreditAttribution: imadalin commentedMatt talks in his video about multiple H1 on same page, about the people abusing of it in the content.
To have it in the main section of the page template is 100% not important for SEO, the thing that you need to really take care is how you use headings in your content.
I see that many people confuse this.
An example of logical map of using Headings based on Google's articles on their blogs:
Try to think on lists and definition lists same time, it is the same logical algorithm behind Headings importance.
Now, most people will have different opinions, but this is mine and I know it works.
Comment #6
andregriffin CreditAttribution: andregriffin commentedYes, I believe this is a remnant from my Framework theme HTML5 outline inclusions. H1 use was redefined in the HTML5 spec, but I don't know how much that took hold. Bootstrap example pages seem to ignore HTML5 structural markup, so maybe it's best to go by Bootstrap convention first? I'd need to do more research on current usage trends I guess.
Comment #7
markhalliwellReviewing #4:
Is there a reason this all this is added?
Don't include the compiled CSS please, this is done as a maintainer GK (gate-keeper) commit.
Comment #8
markhalliwellWe are no longer working on the 7.x-2.x branch. If people need this solution they can apply the patch manually.
Comment #9
markhalliwellWrong version this was introduced in.