Question

Is viewport usable in html versions before html5? And can some one please enlighten me how to use viewport and media queries? I am trying to make a site into a resposive website and at the same time 'mobifying' it. but i don't think it's built using html5. Any insights please? thanks in advance.

Était-ce utile?

La solution

First of all you should not thing of "HTML5" as a single concrete entity and that particular things are usable before HTML5 or not. Whether you can use viewport (I assume you mean <meta name="viewport">) depends largely on the device. <meta name="viewport" content="width=device-width"> and the like are more commonly used for smaller devices such as phones, but you would not need to use it for larger screens. It depends on the situation, though, but I'll reiterate: it depends on the device and the user agent (browser).

As for using media queries this is part of the CSS3 spec and has nothing to do with HTML5 at all. Once again, whether or not media queries are supported (and even how they're supported) depends on the user agent.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top