Jump to content

Just want to know if my HTML code is correct?


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 post
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 post
Share on other sites
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...