CUTCODEDOWN
Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: Well? Muliple H1 tags?  (Read 267 times)

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 519
  • Karma: +5/-0
    • GrumpyYoungMan
Well? Muliple H1 tags?
« on: 22 Feb 2021, 09:17:40 am »
Well, what are your thoughts and feelings on this...

Quote
Will the presence of multiple heading tags (say H1, H2, H3 or even H4) cause any problems with respect to search rankings?

The short answer is No, it won’t. The presence of multiple heading tags does not affect your search rankings, it neither helps nor it hurts. It is recommended to keep only one H1 tag on a page as the main article headline but if your page somehow ends up having multiple heading tags in different order, it is not much of a problem.
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

coothead

  • Full Member
  • ***
  • Posts: 192
  • Karma: +50/-0
  • I smile benignly
    • coothead's stuff ~ an eclectic collection
Re: Well? Muliple H1 tags?
« Reply #1 on: 22 Feb 2021, 09:38:49 am »
Hi there GrumpyYoungMan,

personally,  i prefer to use/see just one h1 in the document, but
I am, of course, very old and in my heart an HTML4 strict sort of
guy.
But with the introduction of the <section> element in HTML5 it
appears that adding  an h1 to any number them is OK. Why the 
creators of this abomination allowed this in favour of the h2 is
beyond my comprehension.  :o  :-[

coothead
~ the original bald headed old fart ~

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 519
  • Karma: +5/-0
    • GrumpyYoungMan
Re: Well? Muliple H1 tags?
« Reply #2 on: 22 Feb 2021, 10:37:30 am »
Hi there GrumpyYoungMan,

personally,  i prefer to use/see just one h1 in the document, but
I am, of course, very old and in my heart an HTML4 strict sort of
guy.
But with the introduction of the <section> element in HTML5 it
appears that adding  an h1 to any number them is OK. Why the 
creators of this abomination allowed this in favour of the h2 is
beyond my comprehension.  :o  :-[

coothead
One H1 per section in a funny way does make sense, but I agree using a H2 would be better and then just leave using H1 for the main body content of the page.

I guess they thing allowing H1 in the section gives the emphasis to the section title?
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

coothead

  • Full Member
  • ***
  • Posts: 192
  • Karma: +50/-0
  • I smile benignly
    • coothead's stuff ~ an eclectic collection
Re: Well? Muliple H1 tags?
« Reply #3 on: 22 Feb 2021, 10:57:23 am »
Quote from: GrumpyYoungMan
I guess they think allowing H1 in the section gives the emphasis to the section title?

Believe that, and you'll believe anything.  ;D

<h1>  is the HTML element for the first-level heading of a document.

Source:-

https://www.w3.org/QA/Tips/Use_h1_for_Title

I can see no good reason for the dip shits who created HTML5
to play silly buggers with it and ignore it,  other than they could
and did.  :o

coothead
~ the original bald headed old fart ~

GrumpyYoungMan

  • Hero Member
  • *****
  • Posts: 519
  • Karma: +5/-0
    • GrumpyYoungMan
Re: Well? Muliple H1 tags?
« Reply #4 on: 22 Feb 2021, 11:08:55 am »
Quote from: GrumpyYoungMan
I guess they think allowing H1 in the section gives the emphasis to the section title?

Believe that, and you'll believe anything.  ;D

<h1>  is the HTML element for the first-level heading of a document.

Source:-

https://www.w3.org/QA/Tips/Use_h1_for_Title

I can see no good reason for the dip shits who created HTML5
to play silly buggers with it and ignore it,  other than they could
and did.  :o

coothead
Oh I agree with you, but I was just trying to understand and sound out there logic/thinking?
Trying to learn a new trick to prove old dogs can learn new ones...

Total Novice have-a go Amateur Programmer - not sure that is the right thing to say... but trying to learn...

coothead

  • Full Member
  • ***
  • Posts: 192
  • Karma: +50/-0
  • I smile benignly
    • coothead's stuff ~ an eclectic collection
Re: Well? Muliple H1 tags?
« Reply #5 on: 22 Feb 2021, 11:23:56 am »
Quote from: GrumpyYoungMan
... but I was just trying to understand and sound out their logic/thinking?

Unfortunately, the creators of HTML5 appear to have had a different
agenda, one  which excluded both logic and rational thought.  :o

coothead
~ the original bald headed old fart ~

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 694
  • Karma: +128/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Well? Muliple H1 tags?
« Reply #6 on: 25 Feb 2021, 06:14:53 am »
Unfortunately, the creators of HTML5 appear to have had a different
agenda, one  which excluded both logic and rational thought.  :o
Which is why HTML validation is now pointless pedantic rubbish, with so many valid and/or even essential things now being invalid because... they have no huffing clue what they're even doing or why certain things were created.

It's comical how HTML and CSS have traded places on that. Used to be valid CSS was the pipedream that never happened, and there was no real excuse for invalid HTML. Completely and utterly swapped.

But the rule is that you should only have one H1 if using the "classic" HTML 4 structure. HTML 5 does allow for multiple H1 in terms of resetting to that depth when you open <section>, but that's a WhatWG rule not a W3C one. Most developers and it seems even the W3C are telling the WhatWG to go plow themselves on that one.

Hence best practice is that THE H1 (singular) is THE headING (singular) that everything on the SITE is a subsection of. That means ALL pages. Hence why the site name and/or logo are the best candidate to be your H1 (singular).

H2 mark the start of subsections of that H1, which is why SECTION is a pointless redundancy. And of course the "new" rule that sections should have headings defeats the point of using sections, only further contributing the HTML 5 "validation" being useless halfwit trash.

The first H2 should mark the start of the main content, which is why MAIN is a pointless redundancy unless you are going to violate that rule.

H3 mark the start of subsections of the H2 precending them. H4 mark the start of subsections of the H3 preceding them. Do I have to explain H5 and H6 to you?

That's why starting a page with H5 is ignorant crap. That's why pairing two headings together as "title and tagline" is incompetent crap. That's why jumping all over the place with heading depths is ignorant incompetent inept CRAP!

Because as I'm always trying to drive home, H1..H6 do not mean "fonts in different weights and sizes" any more than HR means "draw a line across the screen". And if those default presentations are why you're choosing said tags, you're choosing all the wrong tags for all the wrong reasons!
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

ingo

  • Junior Member
  • *
  • Posts: 12
  • Karma: +1/-0
Re: Well? Muliple H1 tags?
« Reply #7 on: 25 Feb 2021, 07:49:50 am »

TS: 2021-02-25
TITLE: The struggle with the headings.

For years I've been struggling with all this and have never come
to a conclusion. I have a feeling that the source of the problem
lies somewhere else. But I'm not sure.
    NOTE: I've read many theories on it, but never was satisfied with
                the result. Not just for HTML. For example markup has the
               same problem.

The problem:
    We have a document structure and want to catch that in numbering sections.
    Where does one start the numbering?

Structure:
    What does a document structure look like? For that we first have to look
    at the kind of document. They are not all the same. A magazine is not a book.
    A book can be a single story or a collection of short stories or papers.
    The best way to see structure is to write in outline style. This is what I've been
    doing for decades. First on paper at school, then later on digital tools.

    Common:
        What all documents have in common is a title.
        A book has a title but does not need to have chapers (Terry Pratchett). A
        magazine has a title and each article has a title. There may be headings. A
        technical paper has a tile and there may be headings.
        There's someting else in common. Books have an ISBN, papers a doi: Digital
        documents have a filename. A (unique) identifier.
        And a website?

    Website:
        A website has a uri/url. It has no title. There are one or more files on a site. A
        file can be one or more documents. Many files can form a single document.
        A webpage has a title. What is a page? What a mess.

[skip a lot here]

Title:
    By writing outline style thing are made more obvious imo. It annoys that the  title
    is pushed to a tab. Even though is perfectly possible to put it on a page with
    proper mark up.
    If we use the title as a website title, as in book or magazine title, It prevents the use
    of H1 as a title replacement and thus all strange H2&H3 schemes. H1 must become
    a document title then. But that feels strange.
    Look at this little document. It has a title. It has four sections that start on the first
    level, one even without a heading. Assuming TITLE is on level 0, these four should be H1.
    When this little document is part of a bigger thing, levels change.

[skip even more]



I feel there is either something missing or a lot too much. What is missing is a website title if you take the title element as a document title, or vice versa.
The other thing is that the <Hx>...</Hx> don't include their real content. Sections try to solve this and it feels messy as you are still numbering. Numbering should be automatic
   
Without conclusion,

Cheers.

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 694
  • Karma: +128/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Well? Muliple H1 tags?
« Reply #8 on: 25 Feb 2021, 10:47:20 pm »
Code: [Select]
<title>
The struggle with the headings - Site Title
</title>

<h1>Site Title</h1>

<h2><time>25 Feb 2021</time> The struggle with the headings</h2>
<p>
For years I've been struggling with all this and have never come to a conclusion. I have a feeling that the source of the problem lies somewhere else. But I'm not sure.
</p><p>
<strong>NOTE:</strong> <em>I've read many theories on it, but never was satisfied with the result. Not just for HTML. For example markup has the same problem.</em>
</p>
<h3>The problem:</h3>
<p>
  We have a document structure and want to catch that in numbering sections. Where does one start the numbering?
</p>

<h3>Structure:</h3>
<p>
What does a document structure look like? For that we first have to look at the kind of document. They are not all the same. A magazine is not a book. A book can be a single story or a collection of short stories or papers. The best way to see structure is to write in outline style. This is what I've been doing for decades. First on paper at school, then later on digital tools.
</p>

<!-- assuming common and website are subsections of "structure" -->

<h4>Common:</h4>
<p>
What all documents have in common is a title.  A book has a title but does not need to have chapers (Terry Pratchett). A magazine has a title and each article has a title. There may be headings. A technical paper has a tile and there may be headings. There's someting else in common. Books have an ISBN, papers a doi: Digital documents have a filename. A (unique) identifier. And a website?
</p>

<h4>Website:</h4>
<p>
  A website has a uri/url. It has no title. There are one or more files on a site. A file can be one or more documents. Many files can form a single document.  A webpage has a title. What is a page? What a mess.
</p><p>
The above paragraph makes no sense. Websites have a title, its' in the TITLE tag and should contain the page title, a hyphen, and then the site title. Just as the site title should be the H1, and the page title (if any) should be the first H2.
</p>

<hr><!-- change in topic equivalent to H2 -->

Footer / disclaimer here
Get it? This was 4th and 5th grade English class in the late '70's in Taxachusetts. I don't get why people find this so hard.

And yeah, I guessed on the H4 as it was unclear if those were subsections or sibling sections. It's not flipping rocket science.

H1 for site title. First H2 for main content title. H3 for subsections of that main content. H4 for subsections of those H3... then if you have later sibling level sections you go back to H2 and lather-rinse-repeat.
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

ingo

  • Junior Member
  • *
  • Posts: 12
  • Karma: +1/-0
Re: Well? Muliple H1 tags?
« Reply #9 on: 26 Feb 2021, 02:13:24 am »
There you have it,

Code: [Select]
<title>
    The struggle with the headings - Site Title
</title>

this shows a main problem. I have to parse the content of the title to get to the - Site Title. Meh! You use constructions to circumvent omissions in the standard. Site title is metadata and should be available as a tag in the head.

Code: [Select]
<head>
    <site-title>
        Site Title
    </site-title>
    <title>
        The struggle with the headings
    </title>
</head>

now the title is the document title and nothing else. Simple and clear.

One could add one extra element for parts of a site that have a distinct function: http://forum.website.org (although I don't really like it and it will be abused)

Code: [Select]
<head>
    <site-title>
        cutcodedown
    </site-title>
    <site-section>
        forum
    </site-section>
    <title>
        The struggle with the headings
    </title>
</head>

Title can be rendered on the page and should be. For the other(s) it also should be made possible. Once these are explicitly defined, the headings only relate to the content of the document it self and only then multiple H1's make sense. The current specs are fixing the wrong part.

Now, this is not the situation we live in, but if I had to make a single change to the specs it would be this.

(In MOM (My Outline Mess) a heading always ends in a: and can have siblings, paragraphs etc. Paragraphs etc. can only have NOTE:'s as siblings. Notes can have no siblings. Before an item there can be metadata like TS: timestamp. There can be multiple documents in a file. A document starts with a title. Multiple documents in a file makes it easy to treat them as records. Is this what they try to do with the article tag?)

Numbering headings is stupid. If you copy paste a section they may make no sense any more. A numberless <H> tag combined with the proper, nested use of sections could be a way out. But who wants to write that?

PS. What I really like is that your logo on a forum page points to the front page of the site instead of to the forums as is mostly seen.

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 694
  • Karma: +128/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Well? Muliple H1 tags?
« Reply #10 on: 26 Feb 2021, 11:31:37 am »
Actually it shows you don't get HTML... or what the TITLE tag is or what HEAD is for. That's not your fault, 'cause damn it's poorly documented and from the start assumed people knew things like logical document structure. Probably because TBL's original audience for this was folks writing science papers at CERN and other institutions.

Anything inside <head> is NOT actually considered part of the page content. It is instructions for browsers to ENHANCE the page content.

the TITLE tag is for text that will be used to link back to the current page, or to describe the tab/window. It is NOT where you go looking for the page title or site title, it's where you tell the browser or other user-agent what text to show on a back-link for something like a search engine or generated link, or the window frame / tab.

What you just made up tags for has NOTHING to do with ANYTHING that belongs inside HEAD.

Your "section" is kinda pointless, but the real relationship would be the H1 and H2.

And it's not silly for them to be called that, as that's what they're called in English. The "heading 1" describes the document, whilst heading 2's describe major subsections of that document.

Think of the H1 as being like the title of a newspaper or book, where it appears on each and every page. It might be bigger atop the home-page and smaller with the page number on subpages, but it's still that same depth heading. It's only replicated across pages to tie the document together. Web pages are supposed to be thought of in the same mindset.

Did you not learn this in grade school? 'Cause it seems like nobody else learned this in grade school. HTML was quite literally created as a 1:1 of proper grammar/structural rules of the English language as used in things like scientific papers, whitepapers, technical documents, legal documents, and business letters. The five heading depths being a part of that, with H6 thrown in as "overkill". (If your content itself actually hits H6, there's probably something wrong with your document)

Also welcome aboard, be warned this is the firing line. No toxic positivity allowed! :P
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 694
  • Karma: +128/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Well? Muliple H1 tags?
« Reply #11 on: 26 Feb 2021, 11:33:43 am »
Oh, also...
PS. What I really like is that your logo on a forum page points to the front page of the site instead of to the forums as is mostly seen.
Yeah that's a pet peeve of mine as well. Laugh is either way you do it, you tend to get the same number of likes/dislikes. As silly as it is annoying.
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

ingo

  • Junior Member
  • *
  • Posts: 12
  • Karma: +1/-0
Re: Well? Muliple H1 tags?
« Reply #12 on: 26 Feb 2021, 01:24:38 pm »
[...]
And it's not silly for them to be called that, as that's what they're called in English. The "heading 1" describes the document, whilst heading 2's describe major subsections of that document.
[...]
Did you not learn this in grade school? 'Cause it seems like nobody else learned this in grade school. HTML was quite literally created as a 1:1 of proper grammar/structural rules of the English language as used in things like scientific papers, whitepapers, technical documents, legal documents, and business letters. The five heading depths being a part of that, with H6 thrown in as "overkill". (If your content itself actually hits H6, there's probably something wrong with your document)
[...]

I'll dig up some English grammar books then. English is not my mother tongue, it's the third language I learned. School was many decades ago.

Cheers.

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 694
  • Karma: +128/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Well? Muliple H1 tags?
« Reply #13 on: 26 Feb 2021, 08:23:09 pm »
I'll dig up some English grammar books then. English is not my mother tongue, it's the third language I learned. School was many decades ago.
Well then you at least have a valid excuse to not know it. Sad part is I'm reasonably certain that this stuff stopped being taught here in the colonies sometime between 1980 and 1990, and upped to college level for things like legal documents and scientific papers -- again, TBL's target audience.

Which would be ironic that it faded out of education the same time HTML started taking off.
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

ingo

  • Junior Member
  • *
  • Posts: 12
  • Karma: +1/-0
Re: Well? Muliple H1 tags?
« Reply #14 on: 27 Feb 2021, 04:50:25 am »
scientific papers

Started with those as I read many of them. Their structure is no surprise. Big Heading1 in the middle and go from there. But that's just a single document.

If we publish on a website can I say the root changes and the root is H1? The site name is H1 so the first (main) heading of the paper gets to be H2. The same situation as publishing in a printed journal? Looks fine but I doubt it can be taken as a rule.

The one I'm currently reading is published by Wiley's in the Journal of the Institute of Brewing and Distilling. Wileys: H1, JIBD: H2, paper: H3. Nope. No rule. Continuing like this you'd go way beyond H5.

So we only look in the direct surroundings of the document. If there's none, H1. If there is something: H2. But what should H1 be in the above case? Wiley or the JIBD?

Looking at the title for clues,
Code: [Select]
<title>Preliminary microbiological and chemical analysis of two historical stock ales from Victorian and Edwardian brewing - Thomas -  - Journal of the Institute of Brewing - Wiley Online Library</title>
, JIBD? The parent / nearest ancestor.

So when looking at a tree structure you don't keep counting levels down. Instead you kind of use a window and slide that over the tree.

Thanks for your time,
Cheers

 

SMF spam blocked by CleanTalk

Advertisement