Interview Question

What is an image tag?

`<img>` should be used for its proper HTML purpose.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

`<img>` is a replaced element that embeds an image. • Provide `src` and meaningful `alt` text, or empty `alt` for a purely decorative image. • Browsers apply the native parsing and behavior defined for this element. • Using its native meaning helps assistive technology understand the content when the element has accessibility semantics.

💡 Simple Example

<img src="/images/library.jpg" alt="Students reading in the school library" width="640" height="360">

⚡ Quick Revision

`<img>` should be used for its proper HTML purpose.