start learning
Image 1
32010261585

Meta Viewport tag

Role: Controls the layout on mobile browsers.
Importance: Essential for responsive web design, impacting user experience and mobile SEO.



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

Meta Viewport tag must be placed between the <head> and </head> as follow:


<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sample Page</title>
</head>
<body>
      <!-- body content here -->
<footer>
        <!-- Footer content here -->
    </footer>
</body>
</html>
×