I have been looking on the web and I'm still confused on which works and does not. I see errors on chrome when I use the semi-colon, but the iPhone recognizes it. The comma works also without errors. I'm wondering which one is qualified as the correct way of writing it.
Semi Colons -
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
Commas -
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" / >
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
I'm just looking for a correct interpretation of why I have this error if both work, especially why it throws an error on Chrome.
Viewport is a meta tag located in the <head> of the HTML. It's the visible part of a web page that a user can see from their device or monitor.
The browser's viewport is the area of the window in which web content can be seen. This is often not the same size as the rendered page, in which case the browser provides scrollbars for the user to scroll around and access all the content.
@-ms-viewport rule (Internet Explorer) Specifies properties that describe the viewport.
Commas are the correct delimiters for viewport properties. iPhone Safari (and other browsers) might be more forgiving and interpret semicolons as delimiters as well, but then you're relying on the browser's error handling.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With