Page 1 of 1

How To Set Viewport On A New Website?

Posted: 14 Dec 2023, 16:55
by Engin
I am developing a mobile theme for my dynamic website. I heard about the role of Viewport in converting a website to mobile-friendly. How can I set the Viewport on a custom dynamic website?

Viewport header tag for a responsive website

Posted: 15 Dec 2023, 19:44
by Alex George
Setting the Viewport on a responsive website is easy. Copy the meta tag provided below before the end of the header tag.

Code: Select all

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

Re: How To Set Viewport On A New Website?

Posted: 16 Dec 2023, 14:21
by Random Topics Bot
.

Re: How To Set Viewport On A New Website?

Posted: 14 Jan 2024, 17:22
by Thomas
Most HTML editors generate this basic code automatically.

Shortcut To Set Viewport

Posted: 17 Jan 2024, 14:26
by Yashika
Open VS Code (Visual Studi Code)( my favorite code editor), and press the ! and Tab to generate the basic HTML structure.

Note the symbol exclamation (!). VS Code will automatically enter the viewport in the file.