DEV Community

Robert Mion
Robert Mion

Posted on

Test to measure your skills: which HTML snippet would you have written?

If asked to build this component, which HTML would you probably write?

Calendar icon

1

<div>
  May
  10
</div>
Enter fullscreen mode Exit fullscreen mode

2

<div>
  <p>May</p>
  <p>10</p>
</div>
Enter fullscreen mode Exit fullscreen mode

3

<div>
  <h3 id="month">May</h3>
  <h1 id="date">10</h1>
</div>
Enter fullscreen mode Exit fullscreen mode

4

<div class="wrapper">
  <div class="container">
    <div class="month--outer">
      <div class="month--inner">
        <p id="month">May</p>
      </div>
    </div>
    <div class="date--outer">
      <div class="date--inner">
        <p id="date">10</p>
      </div>
    </div>
  </div>
</div>
Enter fullscreen mode Exit fullscreen mode

5

<dl>
  <dt id="month">May</dt>
  <dd id="date">10</dd>
</dl>
Enter fullscreen mode Exit fullscreen mode

Answers:

  1. Brand spankin' new
  2. Beginner
  3. Junior
  4. Junior who thinks you're coding like a Senior, but has a lot of bad habits to un-learn
  5. Senior

Top comments (4)

Collapse
 
stgonzales profile image
Stephen Goncalves

Cool, can you please explain those number 5 tags?

Collapse
 
rmion profile image
Robert Mion

That's a Definition List and it's corresponding Definition Term and Definition Description tags. Lots more great info here: developer.mozilla.org/en-US/docs/W...

Collapse
 
johirkhan12 profile image
JOHIRKHAN12
Collapse
 
ibnsamy96 profile image
Mahmoud Ibn Samy

As a beginner, I'm happy to choose the answer of a junior. 😂❤️