Get Source Code of Webpage


Enter a URL



About Get Source Code of Webpage

How beautiful and attractive is the design of this website or blog. If I know the source code of the design of this website, then I will also make the design of my blog like this.

How is a website made? How is HTML Coding done behind the website? How HTML Tags have been used in this website? Such thoughts must definitely be coming in your mind too?

If you are a programming student, then you must want to know how the coding or programming of this website has been done? And your curiosity will be calm only after seeing the Source Code.

Introduction to Source Code

You can easily see the source code of any website or blog. You can see the HTML Source Code of any Webpage through Internet Browser. Because View Source Code Feature remains inbuilt in browsers. Therefore, there is no need for a separate tool to view the source code of the HTML document. Nor do you need internet for this.

When we see the HTML Source Code of a Webpage, then we are seeing the Source Code of the Result Page. We cannot see the actual code.

Now you must be thinking that while viewing the Source Code, is the entire Source Code visible or only some specific codes are shown?

The answer to this question depends on the type of webpage. You can see almost the complete coding of a Static Website (which is made of only HTML and CSS). And you can see the Coding of only Result Page of a Dynamic Website.

Is it legal to view the source code of a website?

You will not find a single such Web Developer, Web Designer, Web Master. Who has not copied the source code of any other website. Every professional programmer measures his skills only by looking at the source code of other sites.

If you use the source code of another website as a learning tool, then this work is completely legal and safe. If you have used Source Code in the design of your Site or Blog, then you are doing an Illegal work. Which can even land you in jail.

That's why you use Source Code to learn and not Copy Past in your blog. Because we have no right to steal someone's hard work.

Can the entire Coding of a Blog Website be seen through View Source Code?

As we told earlier that the answer to this question depends on the type of your website. If you are looking at the Source Code of a Static Website, then you will be able to see almost all the Coding. And if you are looking at the source code of a Dynamic Website, then you will only be able to see the Source Code of the Result Page. You will not be able to see Actual Coding.

All Search Engines, Server Side Scripts like PHP execute their Queries on the Server. And let us show the Result Page. That's why we can only see the source code of the Result Page. Can't see Actual Code. You cannot see the Source Code of services like Search Engines, Forums, Chats etc.

As well as, you cannot see the codes of External Style Sheet Files, External JavaScript etc. Because their Coding File is connected to the main Webpage by HTML Link Tag. Codes of these files are not written in the main file. That's why we cannot see them.

What are the benefits of viewing the HTML Source Code of a Website or Blog?

There are many benefits of viewing Source Code. By looking at the code of other sites, we get information about Code Placement. You can do the programming of your own website properly. Apart from these advantages, there are many other advantages as well.

  • If you are a Programming Beginner, then Source Code is a storehouse of Practical Knowledge for you. You can easily learn Web Designing through Source Code. You can learn to use HTML Tags properly by looking at the Source Code. And can take Practical Knowledge of using HTML Tags.
  • Source code of other sites is the best source for web developer to learn new skills.
  • To maintain the quality of the website or blog, it is also necessary to see the source code of the website.

How to View Source Code of HTML Document?

There are many different ways to view HTML Source Code. In this Lesson, we will tell you about viewing Source Code in two simple ways.

  1. View Source Code by Right Click
  2. Viewing Source Code by typing “view-source” in the URL of the webpage

Way to View Source Code by Right Click

The way to view Source Code by Right Click Menu is very easy. You can see the HTML Source Code of any webpage by just following some easy steps. So let's see the Source Code by Right Click.

  1. First open the browser. We have used Firefox Browser here. You can use any web browser as per your choice.
  2. Now the source code of the website or blog you want to see. Open it in the browser. If you want, you can open any HTML document created by you.
  3. Now press the Right Click of the Mouse on the top of the webpage. Do not press Right Click on any Image or Link. Otherwise the result may be different. Do keep this in mind.
  4. After pressing Right Click, Right Click Menu will open in front of you. From here you click on View Page Source. This option depends on the browser. That's why it is possible that your browser has a different name. Like in Firefox it is named View Page Source. The name of this option in Internet Explorer is View Source. Other browsers will also have a similar name.
  5. As soon as you click on View Page Source, the source code of the related webpage will open in front of you in a new window. Whatever can be of this type.
  6. By looking at Source Code, you can know how much similarity is there between Actual Webpage and Source Code Page. You must have noticed that Actual Content is surrounded by some HTML Tags. By whose name you can also guess the use of these tags.

Now you have come to know the way to view Source Code by Right Click. Now we will know how to view Source Code by writing view-source.

Way to view Source Code by typing View-Source

  1. The first and second step in this method is the same as the method mentioned above. We are assuming that you have a webpage open in your browser. We are using the same document here as well. Which we have used above.
  2. Now write view-source behind the URL of the webpage in the address bar of the browser and press Enter.
  3. As soon as you press Enter, the source code of the webpage will open in front of you in the New Browser Window.

Way to View Source Code in Mobile Phone

If you want to see HTML Source Code of Webpage in a mobile phone. So you can easily see the Source Code in the Mobile Version of Chrome Browser.

To see the Source Code in Android Mobile, you will have to try the second method from the methods mentioned above. You write view-source behind the URL of the webpage in the Address Bar of Chrome Browser. And tap on Search Icon or Go. If you want, you can also refresh the page. Do whatever you find suitable. Source code will open in front of you.