-1

Is this possible or is it not valid?

<h1>
  <button>
     Caption
  </button>
</h1>

This header is the heading of an accordion. Therefore its a button as it opens and closes the accordion but semantically its a header as its the important chapters of the page. What do you suggest?

Daniel Ramirez-Escudero
  • 3,877
  • 13
  • 43
  • 80

1 Answers1

2

First of all, try the W3C Validator instead of opening a new question every time you want to know if your HTML is valid.

Now to your question - yes it is valid.

Ramiz Wachtler
  • 5,623
  • 2
  • 28
  • 33