user5372593
user5372593

Reputation:

How to test html file for mobile responsiveness

I need to test an html file for mobile responsiveness, but all the resources I have found to do this need a URL or a localhost, is there any way to test responsiveness with just an html file?

Upvotes: 7

Views: 51733

Answers (6)

orlando f puleo
orlando f puleo

Reputation: 31

I use http://www.responsinator.com Very easy and complete, several types of mobile and table devices.

Upvotes: 2

Lior
Lior

Reputation: 40649

There is nothing like using a real phone. As an example, px sizes differ between various phones and can cause troubles. The height of the URL bar comes into play in vertical flex scrolling when the display occupies 100%.

To do this kind of testing, you can use tunneling - products like https://serveo.net/ or ngrok.

Upvotes: 0

Irrech
Irrech

Reputation: 1394

If you save your file .html you can open with firefox or chrome, but i suggest you to use firefox developer edition https://www.mozilla.org/it/firefox/developer/

If you use Firefox you can put in the menu -> development -> flexible display (ctrl+shift+m)

In Chrome (ctrl+maiusc+i + emulation)

In this page you can select the device to view.

Upvotes: 3

daveg
daveg

Reputation: 399

In my opinion, the best way to test responsiveness is in Chrome. Right click on the page and inspect. Then there will be a button to turn on responsive testing. You can choose the device to see how your page will render on all kinds of devices. This is better than resizing your window because there are slight differences in how pages render on different tablets and phones.

Upvotes: 0

GeorgeGeorgitsis
GeorgeGeorgitsis

Reputation: 1262

You have a lot of options to test it, but each option has it's benefits.

  1. You can minimize the browser!
  2. You can use device mode from chrome,mozilla etc
  3. You can find a lot of online responsive site testers for any resolution you want

Upvotes: 0

Hans
Hans

Reputation: 497

Yes, simply open the .html file with Chrome or Firefox. These browsers have device mode.

You can change the screen size and see how it looks on mobile or tablet sized screens.

Upvotes: 10

Related Questions