How to View the HTML Source in Google Chrome

Source: Internet
Author: User

Whether you were new to the web industry or a seasoned veteran, viewing the HTML source of different Web pages is something You is likely to does many times over the course of your career.

For those new to web design and looking to learn, viewing a site ' s source code was one of the easiest ways to get started D own that path. If you see something on a website and want to know how it's done, viewing the source is one-to-do.

Over the years, many web professionals has learned HTML simply by viewing the source of the Web pages that they saw and W Ere intrigued by. In addition to reading web design books or attending professional conferences, viewing a site ' s source code is a great the For beginners to learn HTML.

More THAN JUST HTML

One thing to remember was that source files can being very complicated (and the more complex the website of you were viewing is, t He more complex that site's code is likely-be). In addition to the HTML structure this makes up the page is viewing, there would also be CSS (cascading style sheets) That dictate the visual appearance of this site as well as script files included along with the HTML. Don ' t get frustrated if you can ' t figure out what's going on with the that site immediately. Viewing the HTML source is just the first step in this process. With a little experience, you'll begin to better understand what all these pieces fit together to create the website that You see in your browser.

Step by step instructions
    1. Open the Google Chrome web browser (if you don't have Google chrome installed, this is a free download)
    2. Navigate to the Web page would like to examine
    3. Right click on the page and look at the menu that appears. From that menu, click View Page Source.
    4. The source code for that page would now appear
    1. Alternatively, you can also use the keyboard shortcuts of CTRL + U on a PC to open a window with a site ' s source code disp layed. On a Mac, this shortcut is Command + Alt + U.
DEVELOPER TOOLS

In addition to the simple "View page source" Ability Google Chrome offers, you can also take advantage of their Excel Lent Developer Tools to dig even deeper into a site. These tools would allow you to do only see the HTML, but also the CSS, which applies to view elements on that HTML document.

To use Chrome ' s developer tools:

    1. Open Google Chrome
    2. Navigate to the Web page would like to examine
    3. Click the icon with three lines in the upper right corner of the browser window
    4. From the menu, hover through "more Tools" and then click "Developer Tools"
    5. This would open a window that show the HTML source code to the left of the pane and the related CSS in the right.
    6. Alternatively, if you right-click an element with a Web page and select "Inspect" from the menu that appears, Chrome ' s devel Oper tools would pop up and the exact element you have selected'll be highlighted in the HTML with the corresponding CSS shown to the right.
Is viewing SOURCE CODE LEGAL?

Over the years, I had had many new web designers question whether it was acceptable to view a site ' s source code and use I T in their education and work.

While copying a site's code wholesale and passing it off as your own on a site was certainly not acceptable, using that cod E As a springboard to learn from was actually how many advancements was made in this industry. In fact, you would is hard pressed to find a working Web professional today who have not learned something by viewing a sit E ' s source!

In the end, Web professionals learn from each other and often improve upon the work of that they see and is inspired by, so Hesitate to view a site ' s source code and use it as a learning tool.

(from Thoughtgo)

How to View the HTML Source in Google Chrome

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.