Can a footer have a header tag?

I discussed the header and footer. Since HTML5 provides header, footer, content elements, I believe that it should be used once per page. I will indicate them in the next fragment.

<!-- My understanding -->
<header>
    <!-- code goes here -->
</header>
<content>
    <!-- code goes here -->
    <!-- code goes here -->
</content>
<footer>
    <!-- code goes here -->
</footer>

Few have header elements, footers, as shown below.

<!-- People understanding -->
<header>
    <!-- code goes here -->
</header>
<content>
    <!-- code goes here -->
    <!-- code goes here -->
</content>
<footer>
    <header>
        <!-- They also use <header> in footer. -->
    </header>
    <!-- code goes here -->
</footer>

Can it be headerused in an element footer? In other words, what would you suggest creating an HTML structure?

+4
source share
4 answers

No, this is not true.

header , header footer.

footer HTML5 , footer:

, header, footer main.

W3 HTML Validator, :

8, 20: .

<!doctype html>
<html>
    <head>
        <title>Title</title>
    </head>
    <body>
        <footer>
            <header>
            </header>
        </footer>
    </body>
</html>

content, , .

+3

:

// My understanding
<header>
    //code goes here
</header>
<content>
    //code goes here
    //code goes here
</content>
<footer>
    //code goes here
</footer>

, HTML .

+1

, <header>, <content> <footer> <div> s, . , , , , .

0

MDN:

HTML . , , , , .. .

.

0

All Articles