Suppose you are browsing using the Safari web browser in your iPad or iPhone and you want to see the HTML source code of a website. Unfortunately, the Safari browser doesn't have an inbuilt option to view the source code and you would have to switch to your computer in order to see it.
Here's a cool trick that would allow you to view the source code of a website directly in your iPad or iPhone browser -
Setting up The View Source Bookmark.
- Open any website using their Safari browser on your iPhone or iPad. Then tap on the "Add Bookmark" button just next to the address bar. You can name the bookmark as "View Source" and save it.
- Now tap on the bookmark button on the top left, click on edit and select the "View Source" bookmark we just created.
- Copy the below code and paste it in the URL field of the bookmark and tap on "Done".
View Source code in iPhone and iPad.
Now when ever you want to see the source code of any website, just open it in Safari and tap on the "View Source" bookmark.
This one sends the URL to an external server for processing and shows you a color formatted version of the HTML source code.