How To View The Source Code Of The Page

Table of contents:

How To View The Source Code Of The Page
How To View The Source Code Of The Page

Video: How To View The Source Code Of The Page

Video: How To View The Source Code Of The Page
Video: How To View The Source Code Of Any Web Page 2024, May
Anonim

Browsing in a browser is organized in the following way: the program sends a request to the server specified in the link, and in response receives a set of "spare parts" and assembly instructions. Spare parts are images, flash elements, sound and other files, and instructions on how to place them correctly on the page, color its background, use certain typefaces and font sizes, etc. are contained in the source code of the page. The browser user can see this code itself, and not just the page assembled according to his instructions.

How to view the source code of the page
How to view the source code of the page

Instructions

Step 1

Modern browsers have built-in functionality for viewing the source code of a page. For example, in Opera, to activate this option, click the space of the open page of the site free of pictures, links and other elements and in the drop-down context menu select the item "Source code". The browser will open the source in a separate tab, coloring the lines related to HTML tags, scripts and plain text in three colors.

Step 2

Similar points, but worded a little differently, are in the context menu and other browsers. For example, in Google Chrome this item is named "View page code", in Mozilla Firefox select the line "Source code of the page", and Internet Explorer - "View HTML code". The color scheme of the code will also differ slightly in different applications.

Step 3

The Google Chrome browser has a much more advanced source view option. To use it, in the same context menu, select the item "View element code". After that, the tab with the open web page will be divided into two frames - in the upper one its appearance will remain, and in the lower one there will be detailed information collected not only from the source code tags, but also from the included CSS-style files. You can select source lines in the lower frame, and the browser will highlight in the upper those areas of the page that are formed by these lines. Likewise, selecting an element in the top frame will cause the corresponding code to be displayed in the bottom one.

Step 4

If the page is saved to your computer's hard drive, the file can be opened with any text editor - the source code is written into it as plain text. Just drag this file into the window of running Notepad, Word, or any other application of this kind. Using a regular editor, the source code can not only be viewed, but also edited.

Recommended: