Sams Teach Yourself HTML 4 in 24 Hours
- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Put Your HTML Page Online Today
- I. Your First Web Page
- Hour 1. Understanding HTML and XML
- Hour 2. Create a Web Page Right Now
- Hour 3. Linking to Other Web Pages
- Hour 4. Publishing Your HTML Pages
- II. Web Page Text
- Hour 5. Text Alignment and Lists
- Hour 6. Text Formatting and Font Control
- Hour 7. Email Links and Links Within a Page
- Hour 8. Creating HTML Forms
- III. Web Page Graphics
- Hour 9. Creating Your Own Web Page Graphics
- Hour 10. Putting Graphics on a Web Page
- Hour 11. Custom Backgrounds and Colors
- Hour 12. Creating Animated Graphics
- IV. Web Page Design
- Hour 13. Page Design and Layout
- Hour 14. Graphical Links and Imagemaps
- Hour 15. Advanced Layout with Tables
- Hour 16. Using Style Sheets
- V. Dynamic Web Pages
- Hour 17. Embedding Multimedia in Web Pages
- Hour 18. Interactive Pages with Applets and ActiveX
- Hour 19. Web Page Scripting for Non-Programmers
- Hour 20. Setting Pages in Motion with Dynamic HTML
- VI. Building a Web Site
- Hour 21. Multipage Layout with Frames
- Hour 22. Organizing and Managing a Web Site
- Hour 23. Helping People Find Your Web Pages
- Hour 24. Planning for the Future of HTML
- VII. Appendixes
- A. Readers' Most Frequently Asked Questions
- B. HTML Learning Resources on the Internet
- C. Complete HTML 4 Quick Reference
- D. HTML Character Entities
Q&A
-
I'd like to know exactly how wide the margins of a page are so I can line up my background and foreground images the way I want.
Unfortunately, different browsers (and even the same browser on different types of computers) leave different amounts of space along the top and left side of a page, so you can't precisely line up foreground graphics with background images. Generally, you can expect the top and left margins to be 8 to 12 pixels.
The good news is that you'll learn an elegant and precise way to control margin width in Hour 16, "Using Style Sheets."
-
I used a graphical layout program to design my pages, and when I put the pages online my images look blotchy and seem to take forever to show up. What can I do?
Here's what might be going on: When you place and resize an image in some graphical Web page layout programs (such as Adobe PageMill), the program simply changes the width and height attributes without actually resizing the image file itself. This usually makes the images look kind of crinkly, and can mean that what looks like a little 100x100-pixel image on the page may actually be a huge 2,000x2,000-pixel monster that takes half an hour to download.
Here's how you can fix it: Open the image in Paint Shop Pro (or your favorite image editing software) and resize the image there to that specified in the width and height attributes of the corresponding <img /> tag.
-
I've seen pages on the Web with multiple columns of text, wide margins, and other types of nice layouts you didn't discuss. How were those pages made?
Probably with the HTML table tags, which are discussed in Hour 15, "Advanced Layout with Tables," or with style sheets, discussed in Hour 16.
Workshop | Next Section

Account Sign In
View your cart