Home  >  Article  >  Web Front-end  >  How to view the source code of html web page

How to view the source code of html web page

php中世界最好的语言
php中世界最好的语言Original
2017-11-22 11:56:396361browse

Since we are front-end workers, we must learn to view the source code of HTML web pages. Today I will introduce to you two different methods of viewing the source code of web pages.

What is the source code of the web page? Generally speaking, the code displayed in the browser through HTML syntax rules to allow pictures, text and other content is called web page source code.

Source code (source file) refers to the html code of the web page. The CSS code here can also be called CSS source code.

How to view the source code of a webpage or how to view the source file

The first method: After opening a webpage, click the right button of the mouse and there will be "View Source File", operate the right button of the mouse---> ;View the source file to pop up a notepad, and the content of the notepad is the html code of this web page.

Right-click the mouse to view the source code file of the web page

Right-click the mouse to view the source code of the html web page

You may encounter some web pages where the right mouse button does not respond or a prompt box is raised. That is because The developer of the web page added JS code to prevent users from viewing the source file code or copying the web page content, but this method is useless. You can view the source code of this web page only if you know a little bit about the second method below. Source File.

Second: Click "View" in the browser's statusbar or toolbar and then use the "View Source Code" option. Click View Source Code to view this webpage source code source files.

Viewing the source code of other people's web pages can be helpful when we create web pages. Later, we will introduce more ways to view the source code and how to apply it to other people's source code files.

Commonly used browsers When browsing the web, we can right-click on a blank space of the web page, find the "View web page source code" option in the pop-up tab, and click to view the HTML web page of the currently opened web page. source code.

Related reading:

How to use label tags in html


HTML title tag element How to modify


Why the HTML page is garbled and the solution

The above is the detailed content of How to view the source code of html web page. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:HTML5 text barrage effectNext article:HTML5 text barrage effect