Home > Software engineering >  is this html tag structured valid HTML5?
is this html tag structured valid HTML5?

Time:02-16

Okay so i've been writing an article in my blog and i often use this tag but i wonder if it's valid HTML5 or not i did search on google but couldn't find the right explanation. i hope i'll find that here. okay the tag structure is below

<h1> Heading 1 </h1>
<p>Some Paragraph</p>

  <h2> Heading 2 </h2>
  <p> Short Explanation </p>
   <ul>
    <li> <h3> Heading 3 </h3> 
          <p> Some Explanation
    </li>
   </ul>

I wonder if i could wrap Heading 3 inside the li. is it allowed? and is snipped html code above valid HTML5? sorry for my bad english and thanks

CodePudding user response:

You can test the validity with tools such as validator.nu. That code happens to be valid.

Do note, however, that "valid" is just one, basic metric of QA and does not imply "Good" or "Semantically meaningful".

CodePudding user response:

Yes, you can. I suppose that there may be different reasons why <li> is being used and shouldn't interfere with how the headers are set up.

  •  Tags:  
  • html
  • Related