Viewing Source

Whether you're working with HTML or JavaScript, learning how to look at source code is an important step in becoming an all-powerful Web coder.

Here's the deal: Every Web page you visit is actually just a plain text document, like an email message or a word processing file. It's just a bunch of letters — no pictures, no animations, no colors.

This page of text is written in HTML, and it tells your Web browser what it wants the Web page to look like. The browser reads these instructions and displays the action-packed page. The instructions are called the source code.

Your browser can show you the source code for any page you want. Just visit a page on the Web and choose Page Source from the View menu (if you're using Netscape) or Source from the View menu (if you're using Explorer). Just like that, a page of HTML (and maybe JavaScript) code will appear. This is the code the browser is reading to display the Web page.

You can go back and forth between the source code and the page itself to get an idea of how everything works. Not sure how they made the background for that page? Want to know how they created all those crazy tables? Check the source code and see what's going on behind the scenes.

You can even cut and paste all or parts of the source code into your own HTML file and then tweak them to make them your own. But to do so effectively, you should really know your way around HTML. You can learn this, conveniently enough, by clicking around the topics below.