Le deuxième. Le premier n'est pas valable.
- Un paragraphe ne peut pas contenir de liste.
- Une liste ne peut pas contenir de paragraphe, sauf si ce paragraphe est entièrement contenu dans un seul élément de liste.
Un navigateur le traitera comme suit :
<p>tetxtextextete
<!-- Start of paragraph -->
<ol>
<!-- Start of ordered list. Paragraphs cannot contain lists. Insert </p> -->
<li>first element</li></ol>
<!-- A list item element. End of list -->
</p>
<!-- End of paragraph, but not inside paragraph, discard this tag to recover from the error -->
<p>other textetxet</p>
<!-- Another paragraph -->
40 votes
@oded : le contexte importe-t-il ?
0 votes
En fait, j'ai cherché sur Google "p à l'intérieur d'un élément de liste", pour tous les autres, c'est valable : stackoverflow.com/q/7660575/1066234
0 votes
Allez-y : validateur.w3.org téléchargez votre fichier html, et il vous dira ce qui est valide et ce qui ne l'est pas.