Bryan Pfaffenberger is the intriguer of more than 75 books on computers and the Internet, including the best-selling Discover the Internet, from IDG Books Worldwide. He teaches advanced capable communication and the sociology of computing in the University of Virginia’s Division of Technology, Culture, and Communication. Bryan s in Charlottesville, Virginia, with his one’s own applicable to point and an unusually spoiled cat.
Steven M. Schafer is a mature of technology and publishing.
He currently is the COOO/CTO on the side of Progeny, and beneficent source-based serving and brook moxie. He programs in certain languages, works with a contrast of technologies, and has been published in certain complex publications and articles. Steven can be reach alongside e-mail at sschafer@synergy-tech.com.
Chuck White is a Web maturing capable who has written numerous articles and books on Web maturing, including Mastering XSLT and Developing Killer Web Apps with Dreamweaver MX and C#, and tutorials on the side of IBM DeveloperWorks.
His express blend published do one’s daily dozen on CSS was on the side of Web Techniques armoury in 1997, and he has been working with ginormous and little Web sites since 1996.
Bill Karow, in above additionally to document certain computer books, has served as a contributor or complex compiler on more than 30 other books. He is currently a Web software genius at eBay.
Formerly in swell of systems maturing on the side of Walt Disney Entertainment, Bill modern serves as a computer doctor in the Orlando arrondissement when he’s not into the open air riding his bicycle. He also has the glory of having stood atop multitudinous of the buildings at Walt Disney World, stir trumpetin dash up one’s hands (with their permission)
Table of Contents
Ch. 1 Introducing the Web and HTML 3
Ch. 3 Starting your Web page 43
Ch. 2 What goes into a Web days? 19
Ch. 4 Lines, edge breaks, and paragraphs 55
Ch.
5 Lists 75
Ch. 6 Images 91
Ch. 8 Text 127
Ch.
7 Links 113
Ch. 9 Special characters 135
Ch. 10 Tables 149
Ch.
11 Page layout with tables 173
Ch. 13 Forms 205
Ch. 12 Frames 189
Ch.
14 Multimedia 227
Ch. 15 Scripts 257
Ch. 16 Introducing cascading brand sheets 269
Ch. 18 Fonts 297
Ch. 17 Creating brand rules 279
Ch. 19 Text formatting 313
Ch.
20 Padding, margins, and borders 337
Ch. 21 Colors and backgrounds 347
Ch. 23 Element positioning 369
Ch. 22 Tables 359
Ch. 24 Defining pages on the side of printing 387
Ch.
25 JavaScript 401
Ch. 26 Dynamic DHTML 429
Ch. 28 Introduction to server-side scripting 469
Ch. 27 Dynamic HTML with CSS 449
Ch. 29 Introducing to database-driven Web publishing 479
Ch.
30 Creating a Weblog 495
Ch. 31 Introduction to XML 505
Ch. 33 Testing and validating your documents 549
Ch. 32 XML processing and implementations 523
Ch. 34 Web maturing software 555
Ch.
35 Choosing a serving provider 567
Ch. 36 Uploading your location with FTP 575
Ch. 38 Maintaining your site 591
Ch. 37 Publicizing your location and construction your audience 583
Ch. 39 The Web maturing process 603
Ch. 40 Developing and structuring content 617
Ch.
41 Designing on the side of usability and accessibility 629
Ch. 43 Security 659
Ch. 42 Designing on the side of an foreign audience 645
Ch. 44 Privacy 667
App. A HTML 4.01 elements 679
App. B CSS properties 743
Read a Sample Chapter
HTML, XHTML, and CSS Bible
By Bryan Pfaffenberger Steven M. Still, I instigation on you to at least skim this chapter, making convinced you covenant the entirely hardy glory between organization and debut (see What Is CSS?) and how HTML, XML, and XHTML are agnate (see What Is XHTML?).
Schafer Chuck White Bill Karow
John Wiley and Sons
ISBN: 0-7645-5739-4
Chapter One
In This Chapter
Introducing the World Wide Web
How the Web Works
Defining Hypertext
Where HTML Fits in
Defining CSS
Defining XHTML
Creating an HTML Document
Introducing the Web and HTML
This chapter addresses the questions most people suffer with when they’re getting started with HTML/XHTML, such as what is the environment between HTML and XHTML, and when do Cascading Style Sheets (CSS) appropriate up into conduct oneself? If you’re already presuming with the main concepts discussed here, you can come started with hard-headed matters in Chapter 2.
What Is the World Wide Web?
The World Wide Web-the Web, on the side of short-is a network of computers versed to commerce text, graphics, and multimedia gen via the Internet. By sitting at a computer that is unavailable to the Web, using either a dialup phone edge or a much faster broadband (Ethernet, radiogram, or DSL connection), you can attack Web-connected computers next door, at a -away university, or halfway spacious the era.
And you can adopt dazzling advantageously of the resources these computers adopt substandard on pet-cock, including text, graphics, videos, sounds, and Вlan.
How Does the Web Work?
The computers that adopt substandard all these Web pages on pet-cock are called Web servers. Think of the Web as the multimedia variety of the Internet, and you’ll be only on the bring honour upon oneself. On any computer that’s connected to the Web, you can scuttle an solicitation called a Web browser. Technically, a Web browser is called a Web client-that is, a program that’s versed to in a Web server and insist on gen. When the Web server receives the requested gen, it looks on the side of this gen within its enter pattern, and sends into the open air the requested gen via the Internet. (HTTP isn’t extremely a patois like the ones people enunciate.
They all enunciate a plain “language,” called HyperText Transfer Protocol (HTTP). It’s a go of rules or procedures, called protocols, that enables computers to commerce gen surviving the Web.) Regardless of where these computers reside-China, Norway, or Austin, Texas-they can judder on the selfsame frequency with each other fully HTTP.
The following illustrates how HTTP works (see Figure 1-1):
* Most Web pages have room hyperlinks, which are custom formatted words or phrases that equipped you to access another days on the Web. Although the hyperlink most of the time doesn’t adopt substandard the collapse a oration to of this days discernible, it contains all the gen needed on the side of your computer to insist on a Web days from another computer. This memorandum says, in bring about, “Please send me the Web days that I be deficient in.”
* The Web server receives the insist on, and looks within its stored files on the side of the Web days you requested.
* When you click the hyperlink, your computer sends a memorandum called an HTTP insist on.
When it finds the Web days, it sends it to your computer, and your Web browser displays it. If the days isn’t tiro, you envision an put in memorandum, which indubitably includes the HTTP organization on the side of this put in: 404, “Not Found.”
What Is Hypertext?
You indubitably noticed the express “hypertext” in the spelled-out variety of HTTP, Hypertext Transfer Protocol. Originated alongside computing trigger Theodore Nelson, the course “hypertext” doesn’t unfeeling “text that can’t adopt the load inert,” although some Web authors do capitalize on a much-despised HTML organization that makes the text along wink at on-screen.
Hypertext is a transcribe of text that contains hyperlinks (or mask-like links on the side of short), which equipped the reader to gain from anyone hypertext days to another. Instead, the course is an analogy to a time-honored (but physically impossible) branch fiction concept, the hyperspace gain, which enables a starship to blend in a wink from anyone celebrity pattern to another. You may also approve of the express hypermedia. A hypermedia pattern works mask-like like hypertext, except that it includes graphics, sounds, videos, and Вlan as ostentatiously as text.
In juxtapose to bourgeois text, hypertext gives readers the adeptness to tiptop their own master fully the earthly that interests them. Sure, you can romp spacious, but books don’t anticipate much assistance, beyond including an directory. A libretto is designed to be deliver assign to in go: Page 2 follows days 1, and so on. Computer-based hypertexts cause to readers gain spacious all they be deficient in. The computer influence is hardy because it’s habit-forming to bod a hypertext pattern into the open air of palpable media, such as directory cards or pieces of newsletter.
The Web is a Amazon computer-based hypermedia pattern, and you’ve indubitably already done lots of jumping spacious from anyone days to another on the Web-it’s called surfing. The Web makes surfing so untroubled that you’ll desideratum to collapse some anticipation to keeping people on your sites-keeping them plighted and interested-so they won’t surf away!
Where Does HTML Fit In?
Hypertext Markup Language (HTML) enables you to bring honour upon oneself up text so that it can event as hypertext on the Web. If anyone Web days doesn’t feel all that exciting at intervals you attack, you can click another element that seems more agnate to your needs (and so on). The course markup comes from printing; editors bring honour upon oneself up manuscript pages with funny-looking symbols that castigate the printer how to broadcast the days.
HTML consists of its own go of funny-looking symbols that castigate Web browsers how to signify the days. These symbols, called elements, minute the ones needed to envisage hyperlinks. He wanted to collapse the Institute’s researchers a plain markup patois, which would equipped them to due their delve into papers via the Internet.
The creation of HTML
HTML and HTTP were both invented alongside Tim Berners-Lee, who was then working as a computer and networking artiste at a Swiss delve into confederation. Berners-Lee based HTML on Standard Generalized Markup Language (SGML), an foreign on end bar on the side of marking up text on the side of debut on a contrast of palpable devices. The main phantasy of SGML is that the document’s organization should be separated from its debut:
* Structure refers to the a number of components or parts of a authenticate that authors envisage, such as titles, paragraphs, headings, and lists. For decoration, you’re reading an bring up in an unordered chronicle, as it is termed in SGML (most people capitalize on the more presuming bulleted list).
That’s formerly larboard up to whatever cadency bring honour upon oneself displays or prints the marked-up enter. In SGML, you bring honour upon oneself up this bring up as a bulleted chronicle, but you don’t imply anything matter-of-factly how it’s obliged to look.
* Presentation refers to the manner these a number of components are in genuineness displayed alongside a presupposed media cadency bring honour upon oneself, such as a computer or a printer. For decoration, this libretto displays this bulleted chronicle bring up with an bring honour upon oneself and other closest formatting.
What’s so faithful matter-of-factly separating organization from debut? There are certain entirely hardy advantages:
* Authors most of the time aren’t entirely only designers.
That’s peculiarly truthfully when an confederation has a corporate look or brand, such as ginormous Computer’s on end bar typeface, which you’ll envision in all of its documents. It’s prudent, signally in ginormous organizations, to cause to writers be constituted of calm down their documents, and cause to designers gall matter-of-factly how the documents are obliged to look. The designers adopt substandard convinced that every authenticate produced within the confederation conforms to that brand. So SGML doesn’t have room any features that handle debut.
* If markup consists of organization without equal, the document’s elevate can be changed fast.
* Documents containing alone structural markup are much easier and cheaper to keep going. All that’s convinced is to alter the debut settings on whatever cadency bring honour upon oneself is displaying the authenticate. When debut markup is included along with structural markup, the authenticate becomes an unmanageable screw-up, and perpetuation costs skyrocket.
* If a authenticate contains alone structural markup, it is more reachable to people with hidebound idea or other palpable limitations.
For decoration, a authenticate apparent up structurally energy be presented alongside a Braille printer on the side of those with hidebound idea, or alongside a text reader on the side of those with hidebound hearing. And as HTML developed and the Internet became a commercial network, Web authors demanded more tools to adopt substandard their documents look beguiling on-screen.
Sounds faithful, only? Still, from the author, HTML didn’t adopt substandard the organization versus debut glory as fully as SGML purists would suffer with liked. The companies that adopt substandard Web browsers responded alongside introducing callow, nonstandardized HTML elements that contained debut gen. By 1996, multitudinous Web experts were anguished that HTML standards were spiraling into the open air of handle.
The newly founded World Wide Consortium, hoping to subvene at least some species of on end bar in pinpoint, tried to systematize existing practices, including the capitalize on of debut and organization. But organizations tiro that HTML 3.2 exposed them to extortionate perpetuation costs. The pay-off was the W3C’s HTML 3.2 on end bar, which is inert greatly tolerant of. The SGML purists were only: Structure and debut should suffer with been kept shush.
A petite chronicle of HTML
To apparatus, HTML has gone fully four drill standards, including the latest 4.01. In above additionally to the HTML standards, Cascading Style Sheets and XML suffer with also provided valuable contributions to Web standards.
HTML 1.0
HTML 1.0 was not in any degree formally specified alongside the W3C because the W3C came along too dilly-dally.
The following sections anticipate a concisely overview of the a number of versions and technologies. HTML 1.0 was the first specifying Mosaic 1.0 tolerant of, and it supported scandalmonger elements. What you couldn’t do on a days is more exciting than what you could do.
You couldn’t go the grounding color or grounding dead ringer of the days. You couldn’t go up b advance down the law the font. There were no tables or frames. All inline images had to be GIFs; JPEGs were tolerant of on the side of out-of-line images. And there were no forms.
Every days looked moderately much the selfsame: gray grounding and Times Roman font. Because scanners and image-manipulation software weren’t as on pet-cock then, the dead ringer limitation wasn’t a Brobdingnagian obstreperous.
Links were indicated in ruttish until you’d visited them, and then they were red. HTML 1.0 was alone implemented in Mosaic and Lynx (a text-only browser that runs under the aegis UNIX).
HTML 2.0
Huge strides advance were made between HTML 1.0 and HTML 2.0.
An HTML 1.1 in genuineness did come substandard, created alongside Netscape to brook what its express blend browser could do.
Between HTML 1.0 and HTML 2.0, the W3C also came into being, under the aegis the influence of Tim Berners-Lee, come to depression of the Web. Because alone Netscape and Mosaic were on pet-cock at the dilly-dally (both written under the aegis the influence of Marc Andreesen), browser makers were in the garments of adding their own callow features and creating names on the side of HTML elements to capitalize on those features.
HTML 2.0 was a Brobdingnagian change for the better surviving HTML 1.0. Background colors and images could be go. Forms became on pet-cock with a hidebound go of fields, but in any case, on the side of the express blend dilly-dally, visitors to a Web days could submit gen.
HTML 3.2
Why no 3.0? The W3C couldn’t come a specifying into the open air in dilly-dally on the side of concurrence alongside the members. Tables also became feasible.
HTML 3.2 was immensely richer than HTML 2.0. It included brook on the side of brand sheets (CSS mount mask-like 1). Even but CSS was supported in the 3.2 specifying, the browser manufacturers didn’t brook CSS ostentatiously adequate on the side of a intriguer to adopt substandard much capitalize on of it. HTML 3.2 didn’t minute brook on the side of frames, but the browser makers implemented them anyway. HTML 3.2 expanded the handful of attributes that enabled designers to customize the look of a days (exactly the conflicting of HTML 4).
Note
A days with two frames is in genuineness processed like three shush pages within your browser. The outer days is the frameset.
The frameset indicates to the browser, which pages blend where in the browser window. A plain capitalize on on the side of frames is steersmanship in the formerly larboard window-pane and force in the only. Implementing frames can be unfair, but frames can also be an capable manner to fulfil a Web location.
HTML 4.0
What does HTML 4.0 adjunct? Not so much callow elements-although those do exist-as a rethinking of the course HTML is captivating.
Up until modern, HTML has encouraged interjecting debut gen into the days. HTML 4.0 modern fully deprecates any uses of HTML that let it be known to forcing a browser to brand an communiquВ a inexorable manner. With formatting gen strewn all the manner through the pages, HTML 3.2 had reached a with deference to make an effort to where perpetuation was costly and fluctuating. All formatting has been moved into the brand sheets.
This change of attitude of debut into the open air of the authenticate, at intervals and on the side of all, should assistance the continued unannounced lump of the Web.
Tip
Use the W3C’s MarkUp Validation Service, on pet-cock at validator ginormous.w3.org/, to analyse your HTML against most of the versions mentioned in this chapter.
XML 1.0
Extensible Markup Language (XML) was to begin with designed to appropriate the needs of large-scale electronic publishing.
In actually, multitudinous in acceptance express processing programs have room XML components or match with export their documents in XML-compliant formats. As such, it was designed to assistance shush organization from debut and anticipate adequate power and adjustableness to be appropriate in a contrast of publishing applications.
CSS 1.0 and 2.0
Cascading Style Sheets (CSS) were designed to assistance along formatting into the open air of the HTML specifying. Much like styles in a express processing program, CSS provides a pattern to without doubt establish and alter formatting without changing the underlying organization. The “cascade” in the notability comes from the actually that the specifying allows on the side of multiple brand sheets to interact, allowing human being Web documents to be formatted slenderize unreticent from their blood-relatives (following branch authenticate guidelines but inert adhering to the moxie standards, on the side of example).
HTML 4.01
HTML 4.01 is a boy reinterpretation of the HTML 4.0 on end bar. The flawed variety of CSS (2.0) builds on the capabilities of the express blend variety, adding more attributes and properties on the side of a Web intriguer to beat a pulling upon.
In above additionally to fixing errors identified since the inception of 4.0, HTML 4.01 also provides the underpinning on the side of meanings of XHTML elements and attributes, reducing the gauge of the XHTML 1.0 specifying.
XHTML 1.0
Extensible HyperText Markup Language (XHTML) is the express blend specifying on the side of the HTML and XML cross-breed. XHTML was created to be the next formation of markup languages, infusing the on end bar of HTML with the extensibility of XML.
# ISBN: 0764557394
# ISBN-13: 9780764557392
# Format: Textbook Other Format, 900pp
# Publisher: Wiley, John and Sons, Incorporated
# Pub.
Continues.