untitled

(John Hannent) #1

Chapter 17


Chapter 17: Testing and Debugging ............................................................................


In This Chapter


When punctuation goes bad


Handling browser compatibility problems


Debugging CSS


Validating HTML


D


ebugging, validating, parsing: Whatever you call it, at one time or
another, you’ll need to figure out what’s going wrong. This chapter
shows you techniques and introduces you to free tools that help you fix
errors in your CSS and HTML code and double-check your Web page before
you put it up on the Internet for all to see.

Checking Punctuation .................................................................................


The single best advice for those times when your CSS code isn’t working is to
check your punctuation. Unfortunately, CSS was designed to include several
punctuations derived from the C-type computer languages. This means that you
have to use braces, colons, and semicolons where more sensible punctuation —
or no punctuation at all — would have worked just fine.

For example, take a look at the punctuation in this typical CSS style:

<html>
<head>

<style>

img {
border: silver outset;
border-width:16px;}
Free download pdf