xv Table of Contents

Chapter 22: Optimizing Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299 Choosing the Right Data Structure ...........................................................300 Choosing the Right Algorithm ...................................................................300 Fine-Tuning the Source Code .....................................................................301 Put the condition most likely to be false first ................................301 Put the condition most likely to be true first ................................302 Don't run a FOR-NEXT loop needlessly ..........................................303 Clean out your loops .........................................................................304 Use the correct data types ...............................................................304 Use built-in commands whenever possible ...................................306 Using a Faster Language .............................................................................306 Optimizing Your Compiler .........................................................................307

Part VI: Internet Programming ..................................309

Chapter 23: Playing with HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311 Grasping the Basics of HTML ....................................................................312 Grasping the most important HTML tags .......................................313 Creating a header and title ...............................................................313 Defining the bulk of your Web page ................................................314 Adding comments .............................................................................314 Defining Text with Tags ..............................................................................315 Making a heading ...............................................................................315 Defining a paragraph .........................................................................316 Highlighting a quote ..........................................................................317 Adding emphasis to text ...................................................................318 Using Tag Attributes ...................................................................................319 Aligning text .......................................................................................319 Playing with colors ............................................................................319 Coloring your hyperlinks ..................................................................320 Making a List ................................................................................................321 Unordered lists ..................................................................................321 Ordered lists ......................................................................................323 Definition lists ....................................................................................323 Creating Hyperlinks ....................................................................................325 Making external hyperlinks ..............................................................326 Making internal hyperlinks ..............................................................326 Linking to a specific spot on a Web page .......................................326 Displaying Graphics ....................................................................................327 Putting a picture on a Web page ......................................................328 Adding a background picture ..........................................................329

Beginning Programming For Dummies, 3rd Edition xvi

Creating a User Interface on a Form .........................................................329 Handling events .................................................................................330 Creating a text box ............................................................................331 Creating a command button ............................................................332 Creating a check box .........................................................................333 Creating a radio button .....................................................................335 Deciding to Use Additional HTML Features .............................................337

computer programming for dummiesWhere stories live. Discover now