Datasheet

14
Part I: Creating Great Web Sites
Although at first glance, the code can look like hieroglyphics, basic HTML is
not that complex. Most XHTML tags work in pairs and include an open tag
as well as a close tag that surround content. For example, the <b> tag tells a
browser to begin making text bold and the closing </b> tag tells the browser
to end the bold formatting. Other tags can stand alone, such as the <br />
tag, which adds a line break. XHTML tags must have a closing tag, even if
there’s only one tag, and closing tags always contain a forward slash (/). As a
result, the line break tag in XHTML looks like this: <br />.
<h1>Format headlines with heading tags like this</h1>
<p>Paragraph tags add a line break and a line space
between elements. <b>This tag makes text
bold.</b> This text will not be bold.</p>
One of the great advantages of using Dreamweaver is that you can specify
formatting by clicking buttons or using menu commands, and Dreamweaver
takes care of writing the underlying XHTML code for you.
In the old days, many Web designers created sites entirely in HMTL, using
tags such as HTML tables to create page layouts. These days, the best Web
designs are created by combining HTML tags, such as the Heading tags,
which include <h1> through <h6>, the <div> tag, which divides sections of a
page, and many other tags, with CSS rules, covered in the next section.
Comparing Web Designs
Throughout this book, you find chapters covering a variety of aspects of Web
design, from the basics of creating a page and adding images and links to more
complex concepts such as Cascading Style Sheets (CSS) and one of the newest
options in Web design AJAX (Asynchronous JavaScript and XML). You can
even use these different technologies in combination. The next few sections
are designed to help you understand the differences in the many approaches
to creating page designs to help you decide which one is best for your Web
site, whether you’re building a new site or updating an existing one.
Appreciating the advantages of CSS
A Web site designed with CSS separates content from design. Keeping the
content of a site (such as the text and images) separate from the instructions
that tell a browser how the page should look has many benefits:
CSS simplifies design changes. For example, instead of formatting every
headline in your site as 24-point Arial bold, you can create a style for
the <h1> tag and use that tag to format all your headlines. Then if you
05_345023-ch01.indd 1405_345023-ch01.indd 14 9/2/08 7:12:15 PM9/2/08 7:12:15 PM