Sarfaraj Posted August 1, 2020 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> Link to comment Share on other sites More sharing options...
Ingolme Posted August 2, 2020 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>. Link to comment Share on other sites More sharing options...
Sherin Posted September 4, 2020 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. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 4, 2020 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now