HTML and CSS Reference
In-Depth Information
FAQ
My page looks different in various browsers. What can I do?
Do not expect your Web pages to always look the same in every browser and every browser
version. Web pages that look different in various browsers are a frustrating part of life in the
world of Web developers. The good news is that browser manufacturers are finally beginning to
be less inventive and more compliant with the W3C standards. Also, organizations such as The
Web Standards Project at http://www.webstandards.org have lobbied for standards compli-
ance in browsers. Look for more compliance in the future!
Notice how objects even as simple as dashed borders appear different depending on the
way the browsers display the page. To deal with this, remember the following:
Design for the browser you think most of your visitors will use.
Design the page so that it looks okay (degrades gracefully) in other browsers.
Perhaps the most exciting way to add visual interest to a Web page is to add graphics.
The next section continues with a discussion of types of graphics used on Web pages.
CHECKPOINT 4.1
1. Is it reasonable to try to code a Web page that looks exactly the same on every
browser and every platform? Explain your answer.
2. When a Web page containing the style rules below is rendered in a browser, the border
does not display. Describe what is incorrect with the following code:
h2 { background-color: #ff0000
border-top: thin solid #000000
}
3. True or False? CSS can be used to configure visual elements such as rectangular
shapes and lines on Web pages.
4.2 Types of Graphics
Graphics help to make Web pages compelling. Unfortunately, they can also make pages
very slow to load. This section discusses types and features of graphic files used on the
Web: GIF , JPEG , and PNG .
Browsers render, or display, Web page documents in order, line-by-line, starting at the
top of the document. They also display standard images as the files are read in order
from top to bottom. The top of a standard image begins to display after 50 percent of
the image has been read by a browser. As you read about types of images, look for
techniques you can use to make your pages load faster.
 
Search WWH ::




Custom Search