Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to get Source Code of any website ?

  • Last Updated : 11 Sep, 2021

A Website is defined as a collection of web pages. A website can be designed using HTML, CSS, Bootstrap, etc. HTML language decides what will appear on the webpage and CSS language depicts how it will appear. In other words, HTML place elements on the webpage, and CSS styles it. Bootstrap is pre-compiled CSS. Suppose we see a website eg., and we want its source code then there are two ways to get it:

  • Using Inspect Element (Ctrl + Shift + I )
  • Using View Page Source ( Ctrl + U )

Let’s understand both methods one by one.

1. Using Inspect Element 

Below is the step-by-step implementation.


Step 1: Visit your desired website eg

Step 2: Click on Inspect.

Step 3: You will get code on right-hand side.

Short Cut Key: 

(Ctrl + Shift + I )


2. Using Page Source:

Step 1: Visit your desired website eg

Step 2: Right click on website and click on “View Page Source”.

Step 3: You will get source code as following. 

Shortcut Key


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!