3 Ways to View the Source Code of Website Pages

All browsers basically have a feature to view the source code of the website. Of course it is very useful for developers to check for errors when designing or building the website.

Not only for the purposes of web developers, there is even someone who does source code on websites just to retrieve information, for example, is taking CSS code to imitate the appearance of the web.

In this article, you will learn several ways to view the source code of any website. Not only through the browser, you know, there are even alternative ways if the browser can’t do it.

1. Through the Browser’s Default View Source Code Feature

All browsers can do this the same way. I.e. just right click on the mouse, and after that click on options View Source Code. Later a new tab will open and display the results of the source code for the website page that was opened earlier.

Still with the same functionality, you can also do it manually by typing the command view-source: on before the URL. So an example like below.


Source Code Manually

2. Using Inspect Element

Most popular browsers have this feature which is actually intended for web developers. So Inspect Element will show the website’s source code in detail, and even the results or output from Javascript will also be displayed.

The method is still the same, that is, you only need to right-click on the mouse and after that choose an option Inspect Element. And a dialog will appear on the screen, and please scroll to the menu Elements or Inspector to view the source code.

Using the Inspect Element Feature in the Browser

Not only can the source code be viewed this way, but the call XHR can also be captured and viewed in detail from the information header and also request.

Also read: How to Check Website Speed ‚Äč‚ÄčAccurately

3. Using the Service Source Code Viewer

This third method can be used as an alternative if the first and second methods do not work. For example, the website blocks right-click activity which makes it difficult for someone to see the source code.

Please go to the View Page Source website, and then write the URL of the website page you want to see the code for. Later the source code of the website will be displayed, and you can copy it to notepad so that it is easy to transfer.

Viewing Source Code Through Site Services

The source code results from this third method can be different, you know, that’s because checking the website is done with the website’s server, aka not directly from the browser we use.

Hopefully useful and good luck