HTML Lists — HTML Technical Interview Questions & Answers

Ordered <ol>, unordered <ul>, and description <dl> lists.

HTML Lists

  • Lists (html) is a HTML topic. In plain words you use it for subjects in a list in a course page. Don’t start with a slogan — start with that picture.
  • Smallest example: <ul><li>Maths</li></ul>. Type it, run it, and say what you see. If you can do that from memory, you know Lists (html).
  • From the example next to this theory: Ordered <ol>, unordered <ul>, and description <dl> lists.
  • Trap: using <br> instead of <ul>/<li>. Fix that before you talk about advanced HTML.
  • Viva: what is Lists (html)? Then show <ul><li>Maths</li></ul>. Then name the trap.

Technical Interview Tip: What is Lists (html)? Show this: <ul><li>Maths</li></ul>. Trap: using <br> instead of <ul>/<li>.

Code Examples for HTML Lists

HTML Lists — working example

<ul>
  <li>HTML</li>
  <li>CSS</li>
  <li>JavaScript</li>
</ul>
<ol>
  <li>Learn</li>
  <li>Practice</li>
  <li>Interview</li>
</ol>

HTML Lists — ul = bullets, ol = numbered steps; li wraps each item.

How to Explain HTML Lists to an Interviewer

What is Lists (html)?

Used for subjects in a list a course page Not just the heading

Give one small example of Lists (html).

<ul><li>Maths</li></ul> Ordered <ol>, unordered <ul>, and description <dl> lists

What mistake do beginners make with Lists (html)?

using <br> instead of <ul>/<li> Show the fix

Where do you use Lists (html)?

a course page subjects in a list