0

I am working with an eBook. For the Copyright page, the Details page containing general information about the book and other publication notes I am using the footer element.

Now, I have two basic options. One of them is using a single footer element containing multiple section elements to accommodate all of the pages (4 in total). The other option is to have multiple footer elements, each containing the specific pages.

The first option (only one footer with multiple section) seems better to me, except that when I validate the HTML, it says that I need to have heading (h1, h2, etc.) for each of the section elements. The problem with this is that I do not want to have to use headings for these secondary sections, since they are not as important as the main content of the book and yet, these headings will be prominent and be placed on top of the page outline, making them appear more important than they are.

Can I have multiple footer elements that are adjacent siblings from each other? Is this semantically valid?

The other question/answer that I could find related to this one was html5: using header or footer tag twice?, but it just discusses the use of multiple footer within a page, but not necessarily having them next to each other as adjacent siblings (multiple footer for the same section).

TylerH
  • 20,799
  • 66
  • 75
  • 101
VorganHaze
  • 1,887
  • 1
  • 12
  • 35
  • 1
    There is nothing in the recommendation that prohibits multiple sibling `footer` elements. You just can't have nested `footer`s. – Heretic Monkey Dec 14 '20 at 19:39
  • @HereticMonkey That should be an answer rather than a comment. – TylerH Dec 15 '20 at 16:19
  • @TylerH I disagree. I voted to close the question as opinion based because it's asking for opinions on whether doing that is okay. My comment does not say whether it's okay, just that the recommendation doesn't prohibit anything. – Heretic Monkey Dec 15 '20 at 16:28
  • 1
    @HereticMonkey Whether something is valid HTML isn't a matter of opinion; it's defined by a spec and there are even validators by the spec-writing authority where you can test your HTML for validity. – TylerH Dec 15 '20 at 16:32

1 Answers1

0

The HTML5 standard specifies that nested footer elements are not permitted. Adjacent would not be nested though. Adjacent would mean multiple footer elements for a single parent element, or side-by-side footers which seems sloppy. See MDN.

It really boils down to keeping it simple. Ask yourself, what is the use case for adjacent or side-by-side, or double, footer elements?

Ronnie Royston
  • 16,778
  • 6
  • 77
  • 91