Interview Question

Difference between ordered and unordered lists?

Use ol for a sequence and ul for a simple group.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

An ordered list uses numbered items; an unordered list uses bullet points. • `<ol>` is useful when order matters. • `<ul>` is useful when order does not matter. • Choose the option whose defined semantics and behavior match the task.

💡 Simple Example

<ol><li>Step one</li></ol> <ul><li>Apple</li></ul>

⚡ Quick Revision

Use ol for a sequence and ul for a simple group.