Jump to content

Just want to know if my HTML code is correct?


Sarfaraj

Recommended Posts

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

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

  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...