Can a web page contain multiple elements? What about elements?
Can a web page contain multiple elements? What about elements?
Yes, a web page can contain multiple <header> and <footer> elements. According to the W3C documentation, a <header> element is generally intended to contain the heading of a section (an h1–h6 element or an hgroup element), but it is not strictly required to do so. It can also be used to wrap a section's table of contents, a search form, or any relevant logos. The <footer> element typically contains information about its section, such as authorship, links to related documents, and copyright data.
It is semantically correct to use multiple <header> and <footer> elements within a single page, but there are some guidelines to follow. Each <header> or <footer> should be the first or last element, respectively, of their nearest ancestor sectioning content or sectioning root element, such as <body>, <article>, <nav>, <section>, <aside>, etc. This means that while the <body> of the page should only contain one <header> and one <footer> directly, other nested sectioning elements can have their own <header> and <footer>.
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.