Sams Teach Yourself HTML and CSS in 24 Hours 8th Edition by Julie C. Meloni and Michael Morrison


1256a5e5e850fe3.jpg Author Julie C. Meloni and Michael Morrison
Isbn 9780672330971
File size 8.6 MB
Year 2011
Pages 456
Language English
File format PDF
Category programming


 

Julie Meloni Michael Morrison Sams Teach Yourself HTML and CSS 24 in Hours Eighth Edition 800 East 96th Street, Indianapolis, Indiana, 46240 USA Sams Teach Yourself HTML and CSS in 24 Hours, Eighth Edition Copyright © 2010 by Sams Publishing All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein. International Standard Book Number: 0-672-33097-0 Library of Congress Cataloging-in-Publication Data Meloni, Julie C. Sams teach yourself HTML and CSS 24 hours / Julie Meloni, Michael Morrison. -- 8th ed. p. cm. Rev. ed. of: Sams teach yourself HTML and CSS in 24 hours / Dick Oliver, 7th ed., 2006. ISBN 978-0-672-33097-1 (pbk.) 1. HTML (Document markup language) 2. XHTML (Document markup language) 3. Cascading style sheets. I. Morrison, Michael, 1970- II. Oliver, Dick. Sams teach yourself HTML and CSS in 24 hours. III. Title. QA76.76.H94O4526 2010 006.7'4--dc22 2009046100 Printed in the United States of America First Printing: December 2009 Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. Warning and Disclaimer Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an “as is” basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or from the use of the CD or programs accompanying it. Bulk Sales Sams Publishing offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please contact U.S. Corporate and Government Sales 1-800-382-3419 [email protected] For sales outside of the U.S., please contact International Sales [email protected] Acquisitions Editor Mark Taber Development Editor Michael Thurston Managing Editor Patrick Kanouse Project Editor Jennifer Gallant Indexer Ken Johnson Proofreader Dan Knott Technical Editor William Wolff Publishing Coordinator Vanessa Evans Composition Mark Shirar Book Designer Gary Adair Contents PART I: Getting Started on the Web HOUR 1: Understanding How the Web Works A Brief History of HTML and the World Wide Web ..............................................1 Creating Web Content ......................................2 Understanding Web Content Delivery ................3 Selecting a Web Hosting Provider ......................6 Testing with Multiple Web Browsers ..................8 HOUR 2: Publishing Web Content Creating the Sample File for this Hour ............13 Using FTP to Transfer Files..............................14 Understanding Where to Place Files on the Web Server ................................18 Distributing Content without a Web Server ......22 Testing Web Content ....................................24 HOUR 3: Understanding HTML and XHTML Connections Getting Started with a Simple Web Page..........28 HTML Tags Every XHTML Web Page Must Have ............................................32 Organizing a Page with Paragraphs and Line Breaks ............................................34 Organizing Your Content with Headings ............36 Validating Your Web Content ..........................39 The Scoop on HTML, XML, XHTML, and HTML 5 ..................................................41 HOUR 4: Understanding Cascading Style Sheets How CSS Works ............................................48 A Basic Style Sheet........................................49 A CSS Style Primer ........................................54 Using Style Classes ......................................58 Using Style IDs ..............................................61 Internal Style Sheets and Inline Styles ............62 PART II: Building Blocks of Practical Web Design HOUR 5: Working with Text Blocks and Lists Aligning Text on a Page ..................................68 The Three Types of HTML Lists ......................71 Placing Lists Within Lists ................................73 HOUR 6: Working with Fonts Boldface, Italics, and Special Text Formatting......82 Tweaking the Font ..........................................85 Working with Special Characters ....................89 HOUR 7: Using Tables to Display Information Creating a Simple Table..................................96 Controlling Table Sizes ..................................99 Alignment and Spanning Within Tables ..........102 Page Layout with Tables................................105 HOUR 8: Using External and Internal Links Using Web Addresses ..................................111 Linking Within a Page Using Anchors ............114 Linking Between Your Own Web Content ........117 Linking to External Web Content....................120 Linking to an Email Address ........................120 Opening a Link in a New Browser Window......122 Using CSS to Style Hyperlinks ......................123 HOUR 9: Working with Colors Best Practices for Choosing Colors ..............131 Understanding Web Colors............................133 Using Hexadecimal Values for Colors ............135 Using CSS to Set Background, Text, and Border Colors ................................136 HOUR 10: Creating Images for Use on the Web Choosing Graphics Software ........................143 The Least You Need to Know About Graphics ....144 Preparing Photographic Images ....................145 Creating Banners and Buttons ......................151 Reducing the Number of Colors in an Image ....153 Working with Transparent Images ..................154 Creating Tiled Backgrounds ..........................154 Creating Animated Web Graphics ..................156 HOUR 11: Using Images in Your Web Site Placing Images on a Web Page ....................162 Describing Images with Text..........................163 Specifying Image Height and Width................165 Aligning Images............................................165 Turning Images into Links ............................169 Using Background Images ............................172 Using Imagemaps ........................................173 HOUR 12: Using Multimedia in Your Web Site Linking to Multimedia Files ..........................184 Embedding Multimedia Files ........................187 Additional Tips for Using Multimedia..............190 HOUR 13: Working with Frames What Are Frames?........................................197 Building a Frameset ....................................199 Linking Between Frames and Windows ..........202 Using Inline Frames ....................................204 iv PART III: Advanced Web Page Design with CSS HOUR 14: Working with Margins, Padding, Alignment, and Floating Using Margins..............................................212 Padding Elements ........................................219 Keeping Everything Aligned ..........................223 Understanding the Float Property ..................224 HOUR 15: Understanding the CSS Box Model and Positioning The CSS Box Model ....................................231 The Whole Scoop on Positioning ..................235 Controlling the Way Things Stack Up..............239 Managing the Flow of Text ............................242 HOUR 16: Using CSS to Do More with Lists HTML List Refresher ....................................245 How the CSS Box Model Affects Lists ..........246 Placing List Item Indicators ..........................249 Creating Image Maps with List Items and CSS ..........................................251 HOUR 17: Using CSS to Design Navigation How Navigation Lists Differ from Regular Lists........................................259 Creating Vertical Navigation with CSS ............260 Creating Horizontal Navigation with CSS ........270 HOUR 18: Using Mouse Actions to Modify Text Display Creating a Tool Tip with CSS ........................277 Displaying Additional Rollover Text with CSS ....281 Accessing Events ........................................283 Using onclick to Change

Appearance....284 HOUR 19: Creating Fixed or Liquid Layouts Understanding Fixed Layouts ........................294 Understanding Liquid Layouts ......................295 Creating a Fixed/Liquid Hybrid Layout............298 HOUR 20: Creating Print-Friendly Web Pages What Makes a Page Print-Friendly? ................312 Applying a Media-Specific Style Sheet............315 Designing a Style Sheet for Print Pages ........317 Viewing a Web Page in Print Preview..............320 HOUR 21: Understanding Dynamic Web Sites Understanding the Different Types of Scripting ........................................325 Including JavaScript in HTML ........................326 Displaying Random Content ..........................328 Understanding the Document Object Model ......332 Changing Images Based on User Interaction ....333 HOUR 22: Working with Web-Based Forms How HTML Forms Work ................................339 Creating a Form ..........................................340 Accepting Text Input ....................................344 Naming Each Piece of Form Data ..................345 Including Hidden Data in Forms ....................345 Exploring Form Input Controls ......................346 Submitting Form Data ..................................349 HOUR 23: Organizing and Managing a Web Site When One Page Is Enough............................356 Organizing a Simple Site ..............................357 Organizing a Larger Site................................360 Writing Maintainable HTML Code ..................364 HOUR 24: Helping People Find Your Web Pages Publicizing Your Web Site ..............................371 Listing Your Pages with the Major Search Sites ......................................373 Providing Hints for Search Engines ................374 Additional Tips for Search Engine Optimization......................................379 PART IV: Advanced Web Site Functionality and Management v PART V: Appendixes APPENDIX A: HTML and CSS Resources on the Internet General HTML, XHTML, and CSS Information ....385 Web Browsers..............................................386 Web Page Design ........................................386 Software......................................................386 Colors and Graphics ....................................387 Multimedia ..................................................388 Advanced Developer Resources ....................388 Web Site Hosting ........................................389 Web Site Services ........................................389 APPENDIX B: HTML and CSS Quick Reference HTML Structure............................................392 HTML Text Phrases and Paragraphs ..............395 XHTML Text Formatting Elements ..................398 XHTML Lists ................................................399 XHTML Links................................................400 XHTML Tables ..............................................402 XHTML Embedded Content ..........................407 XHTML Style ................................................410 XHTML Forms ..............................................410 XHTML Scripts ............................................413 XHTML Common Attributes ..........................414 CSS Dimension Style Properties ..................415 CSS Text and Font Style Properties ..............416 CSS Background Style Properties..................419 CSS Border Style Properties ........................420 CSS Margin Style Properties ........................423 CSS Padding Style Properties ......................424 CSS Layout and Display Style Properties ......424 CSS List and Marker Style Properties ............427 CSS Table Style Properties ..........................428 vi About the Authors Julie C. Meloni is both the technical director for i2i Interactive, a multimedia company located in Los Altos, CA, and a scholar working in the field of Digital Humanities. She has written several books and articles on Web-based programming languages and database topics, including the bestselling Sams Teach Yourself PHP, MySQL, and Apache All in One. Michael Morrison is a writer, developer, toy inventor, and author of a variety of computer technology books and interactive web-based courses. In addition to his primary profession as a writer and freelance nerd for hire, Michael is the creative lead at Stalefish Labs, an entertainment company he co-founded with his wife, Masheed. We Want to Hear from You! As the reader of this book, you are our most important critic and commentator. We value your opinion and want to know what we’re doing right, what we could do better, what areas you’d like to see us publish in, and any other words of wisdom you’re willing to pass our way. You can email or write me directly to let me know what you did or didn’t like about this book—as well as what we can do to make our books stronger. Please note that I cannot help you with technical problems related to the topic of this book, and that due to the high volume of mail I receive, I might not be able to reply to every message. When you write, please be sure to include this book’s title and author as well as your name and phone or email address. I will carefully review your comments and share them with the author and editors who worked on the book. Email: [email protected] Mail: Mark Taber Associate Publisher Sams Publishing 800 East 96th Street Indianapolis, IN 46240 USA Reader Services Visit our web site and register this book at informit.com/register for convenient access to any updates, downloads, troubleshooting hints, or errata that might be available for this book. vii Introduction In 2009, it is estimated that more than 1.5 billion people have access to the Internet, including 220 million in the U.S. alone. Throw in 338 million Chinese users, 55 million German users, 48 million British users, 38 million Russian users, and 67 million Brazilians, and you can see the meaning of the word “world” in the term World Wide Web. Many of these Internet users are also creating content for the Web—you can be one of them! Although accurate measurements of the total number of web pages are difficult to come by, Google’s most recent data indicates they hit the 1 trillion mark of indexed pages in the middle of 2008. In the next 24 hours, hundreds of millions of new pages will appear in accessible areas of the Internet. At least as many pages will be placed on private intranets, where they will be viewed by businesspeople connected via their local networks. Every one of those pages—like the more than 1 trillion pages already online—will use Hypertext Markup Language (HTML). As you complete the 24 one-hour lessons in this book, your web pages will be among those that appear on the Internet. These lessons will also help you develop one of the most valuable skills in the world today: mastery of HTML. Can you really learn to create top-quality web pages yourself, without any specialized software, in less time than it takes to schedule and wait for an appointment with a highly paid HTML wizard? Can this relatively short, easy-to-read book really enable you to teach yourself state-of-the-art web page publishing? Yes. In fact, within the first two lessons in this book, someone with no previous HTML experience at all can have a web page ready to place on the web. How can you learn the language of the Web so fast? By example. This book organizes HTML into simple steps and then shows you exactly how to tackle each step. Every HTML code example is listed directly before a picture of the web page it produces. You see how it’s done, you read a clear, concise explanation of how it works, and then you immediately do the same thing with your own page. Ten minutes later, you’re on to the next step. After 24 hours of work, you’re marveling at your own impressive pages on the Internet. Beyond HTML This book covers more than just HTML because HTML isn’t the only thing you need to know to create web content today. The goal of this book is to give you all the skills you need to create a modern, standards-compliant web site in just 24 short, easy lessons. This book covers the following key skills and technologies: . XHTML (eXstensible Hypertext Markup Language) is the current standard for web page creation. Every example in this book is fully XHTML-compatible. Where applicable, HTML 5 is also covered. viii . All the examples in the book have been tested for compatibility with the latest version of every major web browser. That includes Apple Safari, Google Chrome, Microsoft Internet Explorer, Mozilla Firefox, and Opera. You’ll learn from the start to be compatible with the past, yet ready for the future. . There is extensive coverage of Cascading Style Sheets (CSS), which allows you to carefully control the layout, fonts, colors, and formatting of every aspect of your web pages, including both text and images. When it comes to creating eye-popping web pages, CSS goes far beyond what traditional HTML pages could do by themselves. For example, did you know that CSS allows you to specifically tailor the information on a page just for printing, in addition to normal web viewing? . Hours 10 through 12 introduce you to multimedia applications and their use, including where to find industry-standard software you can download and try free. . The technical stuff is not enough, so this book also includes the advice you need when setting up a web site to achieve your goals. Key details—designing an effective page layout, posting your page to the Internet with FTP software, organizing and managing multiple pages, and getting your pages to appear high on the query lists at all the major Internet search sites—are all covered in enough depth to get you beyond the snags that often frustrate beginners. Attention to many of these essentials are what made the first seven editions of this book bestsellers, and this updated edition—the first for this title since 2005—is no different. All of the examples have been updated and a significant portion of the content has been revised to match new examples and new technologies. Visual Examples Every example in this book is illustrated in two parts: . The text you type to make an HTML page is shown first, with all HTML and CSS code highlighted. . The resulting web page is shown as it will appear to users who view it with the world’s most popular web browsers. You’ll often be able to adapt the example to your own pages without reading any of the accompanying text at all. All the examples in this book are standards-compliant and work with Apple Safari, Google Chrome, Microsoft Internet Explorer, Mozilla Firefox, and Opera. While all of the screenshots are taken in Firefox, rest assured that all of the code has been tested in all other browsers. ix You will also find the use of colors within code examples and when elements of code appear in the explanatory text. These colors highlight the different bits and pieces of code both to enhance your familiarity with them and to call attention to their use. . HTML tags are displayed in dark blue. . HTML comments are displayed in brown. . CSS elements are displayed in green. . HTML attribute names are displayed in light blue. . HTML attribute values are displayed in magenta. Be aware that the colors of certain terms change depending on their context. For instance, when CSS elements are used within the style attribute of an HTML tag, they will be color-coded as HTML attribute values (magenta) rather than CSS elements (green). Special Elements As you complete each hour, margin notes help you immediately apply what you just learned to your own web pages. TIP NOTE WARNING Tips and tricks to save you precious time are set aside in “Tip” boxes so that you can spot them quickly. “Note” boxes provide additional information about the topics being discussed. When there’s something you need to watch out for, you’ll be warned about it in “Warning” boxes. Q&A, Quiz, and Exercises Every hour ends with a short question-and-answer session that addresses the kind of “dumb questions” everyone wishes they dared to ask. A brief but complete quiz lets you test yourself to be sure you understand everything presented in the hour. Finally, one or two optional exercises give you a chance to practice your new skills before you move on. This page intentionally left blank HOUR 1 Understanding How the Web Works Before learning the intricacies of HTML and CSS, it is important that you gain a solid understanding of the technologies that help transform these plain-text files to the rich multimedia displays you see on your computer or handheld device when browsing the World Wide Web. A file containing HTML and CSS is useless without a web browser to view it, and no one besides yourself will see your content unless a web server is involved. Web servers make your content available to others who, in turn, use their web browsers to navigate to an address and wait for the server to send information to them. You will be intimately involved in this process, as you must create files and then put them on a server to make them available in the first place, and you must ensure that your content will appear to the end-user as you intended. A Brief History of HTML and the World Wide Web Once upon a time, back when there weren’t any footprints on the moon, some farsighted folks decided to see whether they could connect several major computer networks together. I’ll spare you the names and stories (there are plenty of both), but the eventual result was the “mother of all networks,” which we call the Internet. Until 1990, accessing information through the Internet was a rather technical affair. It was so hard, in fact, that even Ph.D.-holding physicists were often frustrated when trying to swap data. One such physicist, the nowfamous (and knighted) Sir Tim Berners-Lee, cooked up a way to easily cross-reference text on the Internet through “hypertext” links. WHAT YOU’LL LEARN IN THIS HOUR: . A very brief history of the World Wide Web . What is meant by the term “web page,” and why that term doesn’t always reflect all the content involved . How content gets from your personal computer to someone else’s web browser . How to select a web hosting provider . How different web browsers and device types can affect your content 2 HOUR 1: Understanding How the Web Works This wasn’t a new idea, but his simple Hypertext Markup Language (HTML) managed to thrive while more ambitious hypertext projects floundered. Hypertext originally meant text stored in electronic form with crossreference links between pages. It is now a broader term that refers to just about any object (text, images, files, and so on) that can be linked to other objects. Hypertext Markup Language is a language for describing how text, graphics, and files containing other information are organized and linked together. NOTE For more information about the history of the World Wide Web, see the Wikipedia article on this topic: http://en.wikipedia.org/ wiki/History_of_the_Web. By 1993, only 100 or so computers throughout the world were equipped to serve up HTML pages. Those interlinked pages were dubbed the World Wide Web (WWW), and several web browser programs had been written to allow people to view web pages. Because of the growing popularity of the Web, a few programmers soon wrote web browsers that could view graphical images along with text. From that point forward, the continued development of web browser software and the standardization of the HTML— and XHTML—languages has lead us to the world we live in today, one in which more than 110 million web servers answer requests for more than 25 billion text and multimedia files. These few paragraphs really are a brief history of what has been a remarkable period of time. Today’s college freshmen have never known a time in which the World Wide Web didn’t exist, and the idea of “always-on” information and ubiquitous computing will shape all aspects of our lives moving forward. Instead of seeing web content creation and management as a set of skills possessed only by a few technically-oriented folks (ok, call them “geeks” if you will), by the end of this book you will see that these are skills that anyone can master, regardless of inherent geekiness. Creating Web Content You may have noticed the use of the term “web content” rather than “web pages”—that was intentional. Although we talk of “visiting a web page,” what we really mean is something like “looking at all the text and the images at one address on our computer.” The text that we read, and the images that we see, are rendered by our web browsers, which are given certain instructions found in individual files. Those files contain text that is marked up, or surrounded by, HTML codes that tell the browser how to display the text—as a heading, as a paragraph, in a red font, and so on. Some HTML markup tells the browser to display Understanding Web Content Delivery an image or video file rather than plain text, which brings me back to the point—different types of content are sent to your web browser, so simply saying “web page” doesn’t begin to cover it. Here we use the term “web content” instead, to cover the full range of text, image, audio, video, and other media found online. In later lessons, you will learn the basics of linking to or creating the various types of multimedia web content found in web sites. All you need to remember at this point is that you are in control of the content a user sees when visiting your web site. Beginning with the file that contains text to display or codes that tell the server to send a graphic along to the user’s web browser, you have to plan, design, and implement all the pieces that will eventually make up your web presence. As you will learn throughout this book, it is not a difficult process as long as you understand all the little steps along the way. In its most fundamental form, web content begins with a simple text file containing HTML or XHTML markup. XHTML is another flavor of HTML; the “X” stands for eXtensible, and you will learn more about it as you continue through the lessons. The most important thing to know from the outset is that all the examples in this book are HTML 4 and XHTML compatible, meaning that they will be rendered similarly both now and in the future by any newer generations of web browsers. That is one of the benefits of writing standards-compliant code: you do not have to worry about having to go back to your code sometime in the future and change it because it “doesn’t work.” Your code will likely always “work” for as long as web browsers adhere to standards (hopefully a long time). Understanding Web Content Delivery Several processes occur, in many different locations, to eventually produce web content that you can see. These processes occur very quickly—on the order of milliseconds—and occur behind the scenes. In other words, while we might think all we are doing is opening a web browser, typing in a web address, and instantaneously seeing the content we requested, technology in the background is working hard on our behalf. Figure 1.1 shows the basic interaction between a browser and a server. 3 4 HOUR 1: Understanding How the Web Works FIGURE 1.1 A browser request and a server response. However, there are several steps in the process—and potentially several trips between the browser and server—before you see the entire content of the site you requested. Suppose you want to do a Google search, so you dutifully type http://www.google.com in the address bar or select the Google bookmark from your bookmarks list. Almost immediately, your browser will show you something like what’s shown in Figure 1.2. FIGURE 1.2 Visiting www.google.com. Figure 1.2 shows a web site that contains text plus one image (the Google logo). A simple version of the processes that occurred to retrieve that text and image from a web server and display it on your screen is as follows: 1. Your web browser sends a request for the index.html file located at the http://www.google.com/ address. The index.html file does not have to be part of the address that you type in the address bar; you’ll learn more about the index.html file in Hour 2, “Publishing Web Content.” Understanding Web Content Delivery 2. After receiving the request for a specific file, the web server process looks in its directory contents for the specific file, opens it, and sends the content of that file back to your web browser. 3. The web browser receives the content of the index.html file, which is text marked up with HTML codes, and renders the content based on these HTML codes. While rendering the content, the browser happens upon the HTML code for the Google logo, which you can see in Figure 1.2. The HTML code looks like this: ”Google”/ The tag provides attributes that tell the browser the file source location (src), width (width), height (height), border type (border), and alternative text (alt) necessary to display the logo. You will learn more about attributes throughout later lessons. 4. The browser looks at the src attribute in the tag to find the source location. In this case the image logo.gif can be found in the “logos” directory at the same web address (www.google.com) from which the browser retrieved the HTML file. 5. The browser requests the file at the http://www.google.com/logos/logo.gif web address. 6. The web server interprets that request, finds the file, and sends the contents of that file to the web browser that requested it. 7. The web browser displays the image on your monitor. As you can see in the description of the web content delivery process, web browsers do more than simply act as picture frames through which you can view content. Browsers assemble the web content components and arrange those parts according to the HTML commands in the file. You can also view web content “locally,” or on your own hard drive, without the need for a web server. The process of content retrieval and display is the same as the process listed in the previous steps in that a browser looks for and interprets the codes and content of an HTML file, but the trip is shorter: the browser looks for files on your own computer’s hard drive rather than on a remote machine. A web server would be needed to interpret any server-based programming language embedded in the files, but that is outside the scope of this book. In fact, you could work through all the lessons in this book without having a web server to call your own, but then nobody but you could view your masterpieces. 5 6 HOUR 1: Understanding How the Web Works Selecting a Web Hosting Provider Despite just telling you that you can work through all the lessons in this book without having a web server, we actually recommend that you work with a web server. Don’t worry— obtaining a hosting provider is usually a quick, painless, and relatively inexpensive process. In fact, you can get your own domain name and a year of web hosting for just slightly more than the cost of the book you are reading now. If you type web hosting provider in your search engine of choice, you will get millions of hits and an endless list of sponsored search results (also known as ads). There are not this many web hosting providers in the world, although it might seem like there are. Even if you are looking at a managed list of hosting providers, it can be overwhelming—especially if all you are looking for is a place to host a simple web site for yourself or your company or organization. You’ll want to narrow your search when looking for a provider and choose one that best meets your needs. Some selection criteria for a web hosting provider are . Reliability/server ”uptime”—if you have an online presence, you want to make sure people can actually get there consistently. . Customer service—look for multiple methods for contacting customer service (phone, email, chat) as well as online documentation for common issues. . Server space—does the hosting package include enough server space to hold all the multimedia files (images, audio, video) you plan to include in your web site (if any)? . Bandwidth—does the hosting package include enough bandwidth so that all the people visiting your site and downloading files can do so without you having to pay extra? . Domain name purchase and management—does the package include a custom domain name, or must you purchase and maintain your domain name separately from your hosting account? . Price—do not overpay for hosting. You will see a wide range of prices offered and should immediately wonder “what’s the difference?” Often the difference has little to do with the quality of the service and everything to do with company overhead and what the company thinks they can get away with charging people. A good rule of thumb is that if you are paying more than $75 per year for a basic hosting package and domain name, you are probably paying too much. Selecting a Web Hosting Provider 7 Here are three reliable web hosting providers whose basic packages contain plenty of server space and bandwidth (as well as domain names and extra benefits) at a relatively low cost. If you don’t go with any of these web hosting providers, you can at least use their basic package descriptions as a guideline as you shop around. . A Small Orange (http://www.asmallorange.com)—their “Tiny” and “Small” hosting packages are perfect starting places for the new web content publisher. . DailyRazor (http://www.dailyrazor.com)—their RazorLIMIT and RazorSTARTER hosting packages are full-featured and reliable. . LunarPages (http://www.lunarpages.com)—the Basic hosting package is suitable for many personal and small business web sites. One feature of a good hosting provider is that they provide a “control panel” for you to manage aspects of your account. Figure 1.3 shows the control panel for my own RazorPRO hosting account at Daily Razor. Many web hosting providers offer this particular control panel software, or some control panel that is similar in design—clearly labeled icons leading to tasks you can perform to configure and manage your account. FIGURE 1.3 A sample control panel. 8 HOUR 1: Understanding How the Web Works You might never need to use your control panel, but having it available to you simplifies the installation of databases and other software, the viewing of web statistics, and the addition of e-mail addresses (among many other features). If you can follow instructions, you can manage your own web server—no special training required. Testing with Multiple Web Browsers Having just discussed the process of web content delivery and the acquisition of a web server, it might seem a little strange to step back and talk about testing your web sites with multiple web browsers. However, before you go off and learn all about creating web sites with HTML and CSS, do so with this very important statement in mind: every visitor to your web site will potentially use hardware and software configurations that are different than your own. Their device types (desktop, laptop, netbook, smartphone, iPhone), their screen resolutions, their browser types, their browser window sizes, their speed of connections—remember that you cannot control any aspect of what your visitors use when they view your site. Although all web browsers process and handle information in the same general way, there are some specific differences among them that result in things not always looking the same in different browsers. Even users of the same version of the same web browser can alter how a page appears by choosing different display options and/or changing the size of their viewing windows. All the major web browsers allow users to override the background and fonts specified by the web page author with those of their own choosing. Screen resolution, window size, and optional toolbars can also change how much of a page someone sees when it first appears on their screens. You can ensure only that you write standards-compliant HTML and CSS. Do not, under any circumstances, spend hours on end designing something that looks “perfect” on your own computer—unless you are willing to be disappointed when you look at it on your friend’s computer, the computer in the coffee shop down the street, or on your iPhone. You should always test your web sites with as many of these web browsers as possible: . Apple Safari (http://www.apple.com/safari/) for Mac and Windows . Google Chrome (http://www.google.com/chrome) for Windows Summary . Mozilla Firefox (http://www.mozilla.com/firefox/) for Mac, Windows, and Linux . Microsoft Internet Explorer (http://www.microsoft.com/ie) for Windows . Opera (http://www.opera.com/) for Mac, Windows, and Linux/UNIX Summary This hour introduced you to the concept of using HTML to mark-up text files in order to produce web content. You also learned that there is more to web content than just the “page”—web content also includes image, audio, and video files. All of this content lives on a web server—a remote machine often far away from your own computer. On your computer or other device, you use a web browser to request, retrieve, and eventually display web content on your screen. You learned the criteria you should consider when determining if a web hosting provider fits your needs. You also learned the importance of testing your work in multiple browsers once you’ve placed it on a web server. Writing valid, standards-compliant HTML and CSS will help ensure your site looks reasonably similar for all visitors, but you still shouldn’t design without receiving input from potential users outside your development team—it is even more important to get input from others when you are a “design team” of one! 9

Author Julie C. Meloni and Michael Morrison Isbn 9780672330971 File size 8.6 MB Year 2011 Pages 456 Language English File format PDF Category Programming Book Description: FacebookTwitterGoogle+TumblrDiggMySpaceShare In just 24 lessons of one hour or less, you can learn how to use HTML and CSS to design, create, and maintain world-class web sites. Using a clear, down-to-earth approach, each lesson builds upon the previous one, allowing even complete beginners to learn the essentials from the ground up. Full-color figures and clear step-by-step instructions help you learn quickly. Practical, hands-on examples show you how to apply what you learn. Quizzes and Exercises help you test your knowledge and stretch your skills. Learn how to… Build your own web page and get it online in an instant Format text for maximum clarity and readability Create links to other pages and to other sites Add graphics, color, and visual pizazz to your web pages Work with transparent images and background graphics Design your site’s layout and typography using CSS Get user input with web-based forms Publicize your site and make it search-engine friendly Test a web site for compatibility with different browsers Make your site easy to maintain and update as it grows     Download (8.6 MB) Css: The Missing Manual Sams Teach Yourself Php In 24 Hours Visual Design for the Modern Web Html5 And Css: Complete (7th Edition) Concrete5 Beginner’s Guide – Second Edition Load more posts

Leave a Reply

Your email address will not be published. Required fields are marked *