Web Browsing

Which Web browser do you prefer to use? A Web browser is a program on a computer that displays Web pages and allows the user to browse the Web easily. You may be familiar with Internet Explorer, Mozilla Firefox, Opera, Safari, or even Google Chrome. These are all Web browsers. They provide handy features such as placing Web pages in multiple tabs for easy viewing, saving favorite Web sites, and easily navigating backward through your history.

Shows where to put a URL in FirefoxTo get started with a Web browser, we often set up a homepage at a search engine such as Google or Yahoo! in order to make browsing even easier. Other times, one begins browsing the Web by typing in a specific Web address. These addresses are called Uniform Resource Locators, or URLs, and every Web site has one. This URL may be in the form of an IP address (a set of numbers separated by periods) or a domain name (e.g. www.somewebsite.com). Additionally, specific Web pages may have an extra path or filename which is added to the IP/domain with a forward slash ( / ). For example, www.somewebsite.com/path/filename.html.

Whenever you type in an address, click on a link, or submit a form, your Web browser (also called a client) makes a request that is sent out into the Internet cloud. This request includes information about the Web page you are trying to reach and the computer you are using. When the server that holds the page receives the request, it sends a response back to your computer. This response will be the Web page that you requested, or it will be a message about how the server could not find, create, or deliver the page you requested.

Diagrams Request-Response Relationship

Part of the response from the server is the MIME type. This is not displayed to the user. It is a textual description that is only used by the Web browser as an indication of what kind of file was delivered with the response. Typically, the MIME type of a Web page is "text/html." The MIME type of an image would be "image/fext" where fext stands for the file extension of the specific image (jpg, png, gif, bmp, etc.)

As a Web developer, it will be extremely helpful to quickly view the source code of Web pages from a browser. This means looking at the HTML and/or other code that was delivered to your browser in the response from the server. Each browser may do this as little differently. In Internet Explorer, right-click on the Web page and select "View Source" from the context menu. In Mozilla Firefox, either right-click on the Web page and select "View Page Source" or press Ctrl+U. In other browsers, you may have to search for this feature or explore the browser's Help Documentation.

Web Page Concepts

Most Web pages use some version of HTML or XHTML to organize the content on the page and retrieve additional media. Then CSS is used to provide style and layout. Finally, JavaScript or another scripting language is used to provide interactive features. These three languages--HTML, CSS, and JavaScript--represent the content organization, style, and interaction of a Web page, respectively. Your Web browser reads this code, displays the content, and processes the code responsible for changing the page dynamically. You will learn more about the details of these three languages soon.

Validation LogoSince there are lots of different browsers out there, it is important that Web designers write valid code that is well-formed and free from errors. Then, no matter how each browser works internally, they all should produce about the same display for each Web page. Validators are available that will check if a Web page has valid code. If a Web page displays a logo for valid code, you can click on the logo to go to the validator's Web site.