Sarfaraj 0 Posted August 1, 2020 Report Share Posted August 1, 2020 HI, Can I take header and article tag inside a section. I just want to know if my HTML code is correct, please check my code below <section> <header>What happened on this day in History?</header> <article> <h2>A heading here</h2> <p>Some additional information here</p> </article> </section> <section> <header>What happened on this day in History?</header> <article> <h2>A heading here</h2> <p>Some additional information here</p> </article> </section> Quote Link to post Share on other sites
Ingolme 1,020 Posted August 2, 2020 Report Share Posted August 2, 2020 It is valid HTML, but it would be better for search engines if the content between the <header> tags was also wrapped in <h2> tags. The tags in the article block would then be <h3>. Quote Link to post Share on other sites
Sherin 1 Posted September 4, 2020 Report Share Posted September 4, 2020 Your code is correct, but as of coding standards you can declare heading tag <h1>...<h6> at a one time.You can't declared multiple times h2. Quote Link to post Share on other sites
dsonesuk 913 Posted September 4, 2020 Report Share Posted September 4, 2020 1 hour ago, Sherin said: Your code is correct, but as of coding standards you can declare heading tag <h1>...<h6> at a one time.You can't declared multiple times h2. Utter tosh! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.