HTML and CSS Reference
Viewing Web Pages
Viewing your web pages in a browser is an essential part of learning to write HTML code.
Not only does it give you a sense of satisfaction (when everything goes right), but it also pro-
vides a valuable testing platform (when it doesn't). Throughout the balance of this topic, after
you've created or modified a web page, you'll be asked to view it in your browser. This lesson
shows you how to view and change an HTML page.
oPeninG FiLes in a browser
The majority of the time, you'll use your favorite web browser — whether it is Internet Explorer,
Firefox, Safari, Google Chrome, Opera, or another — to view pages and sites posted on the
World Wide Web. However, your browser is also a very capable tool for displaying locally stored
web pages composed of standard HTML.
The steps for viewing a locally saved HTML file in a browser are the same across the spectrum
of modern browsers, with a couple of exceptions. The following programs work identically when
it comes to viewing a local web page, on either a PC or a Mac:
To view a saved web page with these browsers, choose File ➪ Open File or press the keyboard
shortcut, Ctrl+O (Command+O). The standard Open File dialog box, used in all programs
across the operating system, is displayed, like the one in Figure 3-1. Navigate to the desired file
and click Open to load the document in the browser.