Interview Question

What are custom elements?

Custom Elements are reusable browser-defined tags created with JavaScript.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

Custom Elements let developers create their own reusable HTML tag names. • Their names must contain a hyphen. • JavaScript defines how they behave. • They are one part of Web Components.

💡 Simple Example

<weather-card city="Delhi"></weather-card>

⚡ Quick Revision

Custom Elements are reusable browser-defined tags created with JavaScript.