Interview Question

What are meta viewport tags?

The viewport meta element helps responsive layouts use the device width correctly.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

The viewport meta element gives mobile browsers instructions for the page viewport. • `width=device-width` matches the layout viewport to the device width. • `initial-scale=1` sets the initial zoom scale. • Do not disable user zoom because users may need magnification.

💡 Simple Example

<meta name="viewport" content="width=device-width, initial-scale=1">

⚡ Quick Revision

The viewport meta element helps responsive layouts use the device width correctly.