0

I am new to coding, I was writing HTML code, but didn't get why we use data-header in the below code.

<header class="header" data-header>
</header>
Ivar
  • 6,138
  • 12
  • 49
  • 61
  • In HTML, the data-header attribute is not a standard attribute that you'll find in the official HTML specification. Instead, it's a custom attribute that developers can use to add extra information or metadata to an HTML element. Think of it like a label or tag that you can attach to an element, to give it more context or meaning. For example, you might use data-header to store information about the header of a section of content on a webpage. – Alex Apr 22 '23 at 14:56

0 Answers0