+5 votes
in Android Tutorial by (19.9k points)
How to display the html code of a site on an Android mobile

1 Answer

+3 votes
by (130k points)
Best answer


Like any good self-respecting developer, you have tried one day or another to recover the html code of a site from your Android smartphone. Problem, mobile browsers unlike their desktop counterparts do not offer this type of function. In this tutorial, we explain how to remedy this shortcoming..

Source code of a mobile compatible website

If you are on this page, it is probably because you have already tried unsuccessfully to display the source code (html and javascript) of a web page on your phone. It must be said that mobile browsers do not really facilitate our task. No need to waste your time rummaging through the menus, you will not find any option to help you discover the secrets of making a site.

Obviously nothing prevents you from performing this operation from your computer. Except that with the development of the use of smartphones, most websites offer a mobile version . Clearly this means that the display of the web page automatically adapts to the size of your device (smartphone, tablet, computer)..

Obviously if you surf from a computer, your internet browser will not display the same page as on your phone. You will understand, this solution does not allow access to the source code of sites developed specifically for mobiles.

Application dedicated to the display of HTML code

Competition in the web is getting harder. To always stay up to date, web designers as well as web developers must develop their know-how and their knowledge by drawing inspiration from the technical solutions adopted by high traffic mobile sites..

Fortunately, applications can now display the HTML code of a mobile web page . This is particularly the case with HTML Viewer . Very simple to use, this application should satisfy web professionals. And the icing on the cake, it's completely free

  • Launch the Play Store on your Android smartphone or tablet
  • In the search bar at the top of the window, type HTML Viewer
  • Click on the Install button
  • Then launch the application you just installed
  • Select the type of transfer protocol (http or https) of the site whose source code you want to display image
  • Type the address of the web page and confirm by pressing the view source button image
  • Then click on the web view button to display the page in a browser

View source code in an HTML code editor

Now you know how to get the HTML code from a mobile web page. Unfortunately the preview offered by HTML Viewer does not allow you to work efficiently. The text editor interface is far too rudimentary. You will have no choice but to export the HTML code to a tool specially intended for developers.

  • Launch Chrome for mobile
  • Type the URL of the site of your choice
  • Click on the Menu button (3 small dots superimposed) then on Share
  • In the list select the HTML Viewer application
  • Wait a few seconds for the source code of your site to load
  • Then tap the envelope icon image
  • Choose the Gmail option image
  • Enter your e-mail address and the subject of your e-mail
  • Click on the Send button

Now you just have to log into your email and copy and paste the source code into your favorite text editor.