... Sites with
HTML, XHTML,
and CSS
557386 Ch01.qxd 4/2/04 9:52 AM Page 4
Ł
4
Creating Cool Web Sites with HTML, XHTML, andCSS
to comprise the book itself. What you have in your hands is a collection ... the content. By analogy, the Web is the information transfer
system, and Hypertext Markup Language HTML is the format used for content. Some of
the HTML documents available on the Internet aren’t ... Schnorr
Proofreading and Indexing
Publication Services
Cover Design
Michael Trent
557386 FM.qxd 4/2/04 10:00 AM Page iii
Creating Cool
Web Sites with
HTML, XHTML,
and CSS
Dave Taylor
...
... of menus, forms, links, and text.
Understanding the Site
Whether you are going to create a web site for yourself or are hoping to create sites for clients,
you must have a good understanding of ... experience of sites that have right-hand navigation and are
therefore less likely to expect to find it there.
More often, right-hand columns are used for additional content and links to other parts of ... stretches the full height
and width of the browser window (the
height
attribute is an extension to the XHTML recommendation
supported by both IE4 and later, and Netscape 3 and later):
<body>
<table...
... Transitional//EN”
“http://www.w3.org/TR /xhtml1 /DTD /xhtml1 -transitional.dtd”>
< ;html xmlns=”http://www.w3.org/1999 /xhtml lang=”en”>
<head>
<title>Accessing form data</title>
</head>
<body>
<h1>Accessing ... document for a Transitional XHTML page, and add a heading that explains
what the example demonstrates:
<?xml version=”1.0” encoding=”UTF-8”?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 ... create a more stylized form. While use of
CSS is quite advanced on PCs, the support forCSS with form elements on the Mac platform isn’t as strong.
Figure 10-25 shows a form whose text inputs...
... 22
Ł
22
Creating Cool Web Sites with HTML, XHTML, andCSS
HTML, like any other markup language, has some problems. Suppose, for example, you
want to show
< ;html& gt;
—including the angle brackets—in ... use to lay out and format the information. The implied formatting information
contained in
not-yet .html
works for humans visually, but Web browsers ignore it because
it’s not in HTML. In other ... Page 6
Ł
6
Creating Cool Web Sites with HTML, XHTML, andCSS
Figure 1-2: The National Institute for Literacy site.
The simplest of these alternative information services on the Internet is FTP...
... Cool Web Sites with HTML, XHTML, andCSS
Text Formatting with CSS
You’ve looked at the skeleton of CSS long enough; it’s time to dig into some specifics of CSS
formats and styles! To parallel ... Sites with HTML, XHTML, andCSS
Subclasses
Another tremendously powerful trick you can use with CSS is to specify subclasses and to con
strain formatting styles to a subset of your tags. For example, ... in XHTML. You’ll see!
Ł
Even though I write XHTML code exclusively throughout the rest of this book,
XHTML andHTML are very similar. So don’t be confused if I sometimes refer to
note
HTML...
...
Creating Cool Web Sites with HTML, XHTML, andCSS
attributes, the
<a>
tag has no meaning and doesn’t affect the formatting of information. The
following, for example, would result in ... Sites with HTML, XHTML, andCSS
Figure 5-2: A definition list of medicinal herbs with some additional formatting.
With this style modification in place, you can simplify the previous HTMLand also ... so far, expands the depth and sophistication of your HTML
skills. In this chapter, you learned about the various types of lists and how
you can combine them and many CSS styles and formatting...
... Cool Web Sites with HTML, XHTML, andCSS
This isn’t exactly XHTML, but it’s pretty close. To convert Taco’s HTML output to XHTML,
simply add an
alt
tag for the image, and replace the
> ... Cool Web Sites with HTML, XHTML, andCSS
To understand why the
alt=
element is necessary, see Figure 7-4. For this example, I removed
the
alt
tag included in the HTMLand renamed the button ... image’s URL (use the form url(
argument) for the CSS container.
Values are repeat, repeat x, repeat y, or no repeat.
container.
Creating Cool Web Sites with HTML, XHTML, andCSS
you see a million...
... Sites with HTML, XHTML, andCSS
An Introduction to HTML Forms
Forms enable you to build Web pages that let users actually enter information and send it
back to the server. The forms can range ... Web Sites with HTML, XHTML, andCSS
The first pane here is the second frameset: two rows, the first (
top .html
) 30 percent of the
available height, and the second (
bottom .html
) the remaining ...
at the design and specification of forms themselves.
HTML forms are surrounded by the
form
tag, which is specified as
<form action=”url”
method=”method”>
and
</form>
. The...
... skeleton XHTML document, like so:
<?xml version=”1.0” ?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR /xhtml1 /DTD /xhtml1 -transitional.dtd”>
< ;html ... simple form using the
onclick
event, so that
when the user clicks the Submit button the area will be calculated.
Here you can see that the form contains two text inputs for the width and height, and ... common to both
Netscape 2 and IE3 and later versions that support these features.
The W3C is moving toward a standardized way of accessing all XML documents, including XHTML ones;
however, so many...
... contain information such as the server type,
the date and time the page was sent, and the date and time the page was last modified.
Of course, the headers can contain much more information, and using ... the other sites before you test it, you
might have to rewrite every page.
As discussed in Chapter 1, each version of HTMLandXHTML has at least one document containing the
rules for that version ...
returnValue
variable to
true
and collecting the form’s values into variables.
function validate(form) {
var returnValue = true;
var sendTo = form.txtTo.value;
var cc = form.txtCC.value;
var subject = form.txtSubject.value;
var...
... to add formatting and linking informa
tion. HTML is based on Standard Generalized Markup Language (SGML). By con
vention, all HTML information begins with an open angle bracket (
<
) and ends ... paragraph and section head marks, horizontal rules,
and other miscellaneous layout information and data.
Basics of HTML Layout
What is HTML? At its most fundamental, Hypertext Markup Language (HTML) ... bracket (
>
), for example,
< ;html& gt;
. This tag tells an HTML interpreter
(browser) that the document is written and marked up in standard HTML. An exam
ple of an HTML interpreter would...