Interview Question

What are new input types in HTML5?

Modern input types describe the expected data and can improve controls and validation.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

Modern HTML added input types for specific kinds of data. • Examples include `email`, `url`, `tel`, `number`, `range`, `date`, `time`, `color`, and `search`. • Supporting browsers may provide specialized controls and built-in validation. • Server-side validation is still required because client-side checks can be bypassed.

💡 Simple Example

<label for="start-date">Start date</label><input id="start-date" name="start_date" type="date" required>

⚡ Quick Revision

Modern input types describe the expected data and can improve controls and validation.