22.06.2015 Views

Step by Step HTML5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

What Is HTML? xxi<br />

The tag for a hyperlink is , a two-sided tag, but most people wouldn’t recognize it<br />

without the attribute that specifies the file or location to which to jump. For example,<br />

to create a hyperlink with the words Click Here that jumps to the file index.htm when<br />

clicked, the coding would look like this:<br />

Click Here<br />

There’s a lot more to HTML, of course, but that’s basically how it works. Plain text is<br />

marked up with tags that indicate where elements such as formatting, hyperlinks, and<br />

graphics should be applied, and a Web browser interprets those tags and displays the<br />

page in its formatted state. The trick, of course, is to know which tags to use, and where<br />

they’re appropriate, and what attributes they need. And that’s the subject of this book.<br />

Understanding Cascading Style Sheets<br />

Web designers who worked with early versions of HTML to create large Web sites were<br />

often frustrated <strong>by</strong> the amount of repetition involved in their jobs. Suppose a Web site<br />

has 200 pages, all using the same basic layout and design. To make a design change to<br />

the entire site, a designer would have had to go in and manually edit each of those 200<br />

pages.<br />

Later versions of HTML have gotten around this <strong>by</strong> supporting cascading style sheets.<br />

Based on the same principle as style templates in a word-processing or page-layout program,<br />

Web designers use cascading style sheets to specify the formatting for a particular<br />

tag type—usually in a separate style sheet document—and then apply that style sheet<br />

to multiple pages. Need to make a change to the style? Simply make it in the style sheet,<br />

and the change is applied automatically to all pages.<br />

Although you can still format documents <strong>by</strong> using older methods—and you’ll learn how<br />

to do a little of that in this book—most Web designers rely almost exclusively on cascading<br />

style sheets for formatting these days, and XHTML all but demands that you do so.<br />

It might seem intimidating at first, but if you are creating a multi-page site, the extra<br />

trouble involved in setting up a cascading style sheet will pay for itself many times over.<br />

Why Learn HTML in Notepad?<br />

This book teaches beginner-level HTML coding, but it teaches it in a rather fundamentalist<br />

way: <strong>by</strong> creating plain text files in Notepad. There are so many good Web site creation<br />

programs on the market nowadays that you may be wondering why this book takes this<br />

approach.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!