0

Is this correction correct semantically talking? I've written my doubts inside the HTML comments to explain my thoughts.

<article>
    <h2>Movies</h2>
    <h4>Genres</h4>
    <p>Below you can see the <b>available genres</b>:</p>
    <p>1. Action</p>
    <p>2. War</p>
    <p>3. Comedy</p>
    <p>4. Horror</p>
</article>

VS

<section> <!-- Section instead of article? -->
    <header>
         <h2>Movies</h2> 
         <h4>Genres</h4><!-- Should i use to h tags inside the same header? http://www.w3.org/TR/html5/sections.html#headings-and-sections. There sais: "h1–h6 elements must not be used to markup subheadings, subtitles, alternative titles and taglines unless intended to be the heading for a new section or subsection. Instead use the markup patterns in the Common idioms without dedicated elements section of the specification."-->
         <p>Below you can see the <b>available genres</b>:</p> <!-- <b> or <strong>?-->
    </header>
    <ol><!-- ol or ul and place the numbers? -->
        <li>Action</li>
        <li>War</li>
        <li>Comedy</li>
        <li>Horror</li>
    </ol>
</section>
Mimetix
  • 272
  • 1
  • 4
  • 12

4 Answers4

0

Section and header are fine. What is the function/interaction of the genres? If they will be menu options I would wrap in , otherwise I would use UL since they are not in a specific sequence which needs to be maintained.

jdunham
  • 439
  • 3
  • 6
0

<b> - "Represents a span of text to be stylistically offset from the normal prose without conveying any extra importance".

<strong> - "Represents strong importance for its contents." source

Other tags are dependent on their context.

Wojciech Mleczek
  • 1,574
  • 15
  • 18
0

Article is wrong - this doesn't make sense to be in a RSS feed for instance. section would be OK, div might be better.

The Bold is just for formatting, not for emphasis so b would be OK.

If you stick with section, header it should have an H1 and H2, not H3 and 4.

If the order matters, ol, if not ul.

Rich Bradshaw
  • 71,795
  • 44
  • 182
  • 241
  • About h1 and h2, can you explain a bit more this point? I've been reading through this: http://www.w3.org/TR/html5/sections.html#headings-and-sections – Mimetix Sep 23 '14 at 17:59
-1

In HTML5, you can write comments wherever you want.

    <section>
        <p> <!--new P tag -->
            <span>new <!--this new paragraph-->paragraph</span>
        </p>
    </section>
alessandrio
  • 4,282
  • 2
  • 29
  • 40