Tap Safari (iPhone, iPod, or iPad), if it is not already open, and visit this page. This method also works for Chrome
Select the Share Button (also known as the Action button):
Tap Bookmark:
Choose the Name Field and hit the X icon to clear it and name it “Show Page Source” and then tap “Save.”
Now visit this page and select all and copy the javascript code: (code credit: Rob Flaherty)
Confirm that the code you copy from Rob’s site looks the same as this (but copy from this page NOT from below):
javascript:(function(){var a=window.open(‘about:blank’).document;a.write(‘’);a.close();var b=a.body.appendChild(a.createElement(‘pre’));b.style.overflow=’auto’;b.style.whiteSpace=’pre-wrap’;b.appendChild(a.createTextNode(document.documentElement.innerHTML))})();
Tap the Bookmarks icon and tap Edit:
Select the “Show Page Source” bookmark you just created in step # 4:
Tap the Address Field and hit the X icon to clear it, then paste the javascript code you copied in step # 5; then tap Done
Designed with Mobirise - See here