views
- On a computer, right click a blank area of the website and choose View page source. Highlight all the text and hit Ctrl+C (PC) or ⌘ Cmd+C (Mac) to copy.
- On Android, add view-source: to the beginning of the website URL. Tap and hold to highlight a word. Drag the bars to encompass all of the code. Tap Copy.
- On Mac, install the View Source app. Copy and paste your website URL into the app and select go. Tap and hold any word to highlight it. Drag the bars to highlight more code and hit Copy.
Using a Computer
Go to the website you want to copy. You can use any web browser on your PC or Mac to view and copy a website's source code.
Enable the Develop menu (if you're using Safari). If you're using Safari on a Mac, you'll need to enable the Develop menu if you want to view a website's source code. This is only required on Safari, so you can skip this if you're using any other browser: Click the Safari menu at the top of the screen. Click Preferences on the menu. Click Advanced. Select Show Develop menu in menu bar.
Right-click a blank area of the website. A context menu will expand.
Click View page source on the menu. The phrasing may vary slightly on different web browsers, but this option will always display the current page's source code. If you right-clicked in a frame, you'll see View Frame Source instead. This will only display the source code of the current frame. If you see a link to a file with a name like style.css near the top of the source code, this is a separate file that contains the styles (fonts, colors, layout info) for the website. Click the link to open that page. If you want to copy all of the code for the site, you'll also need to copy this page.
Press Ctrl+A (PC) or ⌘ Cmd+A (Mac). This highlights all of the code on the page.
Press Ctrl+C (PC) or ⌘ Cmd+C (Mac). Now the selected source code is pasted to your clipboard. To paste it into the desired location, right-click and select Paste.
Using an Android
Open Chrome or Samsung Internet on your phone or tablet. You can use Google Chrome to view the source code of a website on your Android.
Go to the website you want to view. Wait for the site to load fully before you continue.
Tap the address bar. This displays the address of the website.
Add view-source: to the beginning of the URL. To do this, just move the cursor to the beginning of the URL (before the https://) and type view-source:. For example, if you were going to view the source of wikiHow.com, the URL would look like this: view-source:https://www.wikihow.com
Tap the search, enter, or go key to go to the site. This refreshes the site and displays only its source code. If you see a link to a file with a name like style.css near the top of the source code, this is a separate file that contains the styles settings (colors, fonts, design, etc.) for the website. Tap the link to open that page. If you want to copy all of the code for the site, you'll also need to copy this page.
Tap and hold any word in the source code. This highlights that word and surrounds it by bounding handles.
Drag the bounding handles to select all of the source code. To do this, drag the leftmost bounding handle all the way to the beginning of the page, and the rightmost handle all the way to the end. A small toolbar will appear once you're finished.
Tap Copy on the toolbar. Now that you've copied the source code, you can paste it anywhere, such as into Google Docs or your note-taking app. To paste the code into a file or app, tap and hold the typing area and select Paste.
Using an iPhone or iPad
Install View Source from the App Store iPhone App Store Icon. There's no setting in any iPhone or iPad web browser that lets you view a website's source code easily. Fortunately, there's an app for that! View Source is a small, easy-to-use app that lets you view and copy the source code of any website.
Open Safari (or your preferred web browser). You can still use your regular browser to load the website you want to view.
Copy the URL. Once you're on the page you want to view, tap the address bar at the top of the screen to select the URL. Then, tap it again to bring open the context menu and select Copy.
Open the View Source app. It's the purple icon with a black window, two brackets, and a semicolon. You'll find it on your home screen and/or your app library.
Tap the address bar and select Paste. This pastes the copied URL into the address bar in View Source.
Tap the go key on the keyboard. This displays the source code for the URL you entered.
Tap and hold any word in the source code. This highlights that word and surrounds it by bounding handles.
Drag the bounding handles to select all of the source code. To do this, drag the leftmost bounding handle all the way to the beginning of the page, and the rightmost handle all the way to the end. A small toolbar will appear once you're finished.
Tap Copy on the menu. If it doesn't pop up on its own, tap and hold the highlighted area so it appears, and then select Copy. Once the source code is copied to the clipboard, you can paste it into any app you want, such as the Notes app or an email message. To paste, tap and hold a typing area and select Paste.
Comments
0 comment