Get Beginning Web Programming with HTML XHTML and CSS Jon Duckett free all chapters
Get Beginning Web Programming with HTML XHTML and CSS Jon Duckett free all chapters
com
https://ebookname.com/product/beginning-web-programming-
with-html-xhtml-and-css-jon-duckett/
OR CLICK BUTTON
DOWNLOAD EBOOK
https://ebookname.com/product/html-your-visual-blueprint-for-
designing-effective-web-pages-with-html-css-and-xhtml-1st-edition-
paul-whitehead/
ebookname.com
https://ebookname.com/product/html-xhtml-css-for-dummies-7th-edition-
ed-tittel/
ebookname.com
https://ebookname.com/product/html-xhtml-and-css-comprehensive-6th-ed-
edition-gary-b-shelly/
ebookname.com
https://ebookname.com/product/managing-archives-foundations-
principles-and-practice-1st-edition-caroline-williams-auth/
ebookname.com
Automotive lubricants reference book 2nd ed Edition Caines
https://ebookname.com/product/automotive-lubricants-reference-
book-2nd-ed-edition-caines/
ebookname.com
https://ebookname.com/product/gilbert-law-summary-on-criminal-
procedure-19th-ed-edition-paul-marcus/
ebookname.com
https://ebookname.com/product/the-christians-as-the-romans-saw-them-
second-edition-robert-lewis-wilken/
ebookname.com
https://ebookname.com/product/it-made-e-z-patrick-h-bowman/
ebookname.com
https://ebookname.com/product/legislation-technology-and-practice-of-
mine-land-reclamation-zhenqi-hu/
ebookname.com
Conversation Strategies 3rd Edition Kehe
https://ebookname.com/product/conversation-strategies-3rd-edition-
kehe/
ebookname.com
59313ffirs.qxd:WroxPro 3/22/08 2:30 PM Page v
Beginning
Web Programming with
HTML, XHTML, and CSS
Second Edition
Jon Duckett
59313ffirs.qxd:WroxPro 3/22/08 2:30 PM Page iv
59313ffirs.qxd:WroxPro 3/22/08 2:30 PM Page i
Beginning
Web Programming with
HTML, XHTML, and CSS
Second Edition
59313ffirs.qxd:WroxPro 3/22/08 2:30 PM Page iv
59313ffirs.qxd:WroxPro 3/22/08 2:30 PM Page v
Beginning
Web Programming with
HTML, XHTML, and CSS
Second Edition
Jon Duckett
59313ffirs.qxd:WroxPro 3/22/08 2:30 PM Page vi
Credits
Acquisitions Editor Vice President and Executive Group Publisher
Jennifer Watson Richard Swadley
Production Manager
Tim Tate
59313ffirs.qxd:WroxPro 3/22/08 2:30 PM Page x
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xi
Contents
Introduction xxiii
Contents
The <acronym> Element Is for Acronym Use 31
The <dfn> Element Is for Special Terms 32
The <blockquote> Element Is for Quoting Text 32
The <q> Element Is for Short Quotations 33
The <cite> Element Is for Citations 33
The <code> Element Is for Code 34
The <kbd> Element Is for Text Typed on a Keyboard 34
The <var> Element Is for Programming Variables 35
The <samp> Element Is for a Program Output 35
The <address> Element Is for Addresses 36
Lists 36
Using the <ul> Element to Create Unordered Lists 36
Ordered Lists 37
Definition Lists 39
Nesting Lists 40
How It Works 43
Editing Text 45
Using <ins> to Indicate New Additions to Text 46
Using <del> to Indicate Deleted Text 46
Using Character Entities for Special Characters 47
Comments 47
The <font> Element (deprecated) 48
Understanding Block and Inline Elements 48
Grouping Elements with <div> and <span> 49
Summary 50
Exercises 51
xii
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xiii
Contents
Advanced E-mail Links 74
Summary 75
Exercises 76
xiii
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xiv
Contents
Chapter 5: Forms 139
Introducing Forms 140
Creating a Form with the <form> Element 141
The action Attribute 142
The method Attribute 142
The id Attribute 142
The name Attribute (deprecated) 142
The onsubmit Attribute 143
The onreset Attribute 143
The enctype Attribute 144
The accept-charset Attribute 144
The accept Attribute 144
The target Attribute 145
White Space and the <form> Element 145
Form Controls 145
Text Inputs 145
Buttons 150
Checkboxes 154
Radio Buttons 156
Select Boxes 158
File Select Boxes 164
Hidden Controls 165
Object Controls 166
Creating Labels for Controls and the <label> Element 169
Structuring Your Forms with <fieldset> and <legend> Elements 171
Focus 173
Tabbing Order 173
Access Keys 175
Disabled and Read-Only Controls 176
Sending Form Data to the Server 178
HTTP get 178
HTTP post 179
Summary 183
Exercises 183
xiv
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xv
Contents
Browser-Specific Extensions to the <frameset> Element 192
The <frame> Element 194
The src Attribute 195
The name Attribute 195
The frameborder Attribute 195
The marginwidth and marginheight Attributes 196
The noresize Attribute 196
The scrolling Attribute 196
The longdesc Attribute 197
The <noframes> Element 197
Creating Links Between Frames 198
Setting a Default Target Frame Using the <base> Element 200
Nested Framesets 200
Floating or Inline Frames with <iframe> 204
The <iframe> Element 206
Summary 209
Exercises 209
xv
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xvi
Contents
The text-transform Property 235
The letter-spacing Property 236
The word-spacing Property 237
The white-space Property 237
The direction Property 238
The unicode-bidi Property 239
Text Pseudo-Classes 239
The first-letter Pseudo-Class 239
The first-line Pseudo-Class 240
Selectors 243
Universal Selector 243
The Type Selector 243
The Class Selector 244
The ID Selector 244
The Child Selector 244
The Descendent Selector 245
The Adjacent Sibling Selector 245
Using Child and Adjacent Sibling Selectors to Reduce Dependence
on Classes in Markup 245
Attribute Selectors 247
Lengths 249
Absolute Units 249
Relative Units 249
Percentages 251
Introducing the Box Model 251
An Example Illustrating the Box Model 252
The Border Properties 255
The padding Property 258
The margin Property 259
Dimensions 260
Summary 270
Exercises 270
xvi
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xvii
Contents
Lists 283
The list-style-type Property 284
The list-style-position Property 285
The list-style-image Property 286
The list-style Property (the shorthand) 286
The marker-offset Property 287
Tables 287
Table-Specific Properties 289
The border-collapse Property 289
The border-spacing Property 291
The caption-side Property 292
The empty-cells Property 292
The table-layout Property 294
Outlines 294
The outline-width Property 295
The outline-style Property 295
The outline-color Property 295
The outline Property (the shorthand) 296
The :focus and :active Pseudo-Classes 296
Generated Content 297
The :before and :after Pseudo-Elements 297
The content Property 298
Miscellaneous Properties 301
The cursor Property 301
The display Property 302
The visibility Property 302
Additional Rules 304
The @import Rule: Modularized Style Sheets 304
The @charset Rule 305
The !important Rule 305
Positioning with CSS 305
Normal Flow 306
The position Property 306
Box Offset Properties 307
Relative Positioning 307
Absolute Positioning 309
Fixed Positioning 310
The z-index Property 311
Floating Using the float Property 312
The clear Property 314
Summary 320
Exercises 321
xvii
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xviii
Contents
Chapter 9: Page Layout 323
Understanding the Site 323
Understanding a Site’s Aims 324
Whom You Expect to Visit 325
New Content 326
Defining Your Site’s Content 326
Grouping and Categorization 327
Creating a Site Map 328
Identifying Key Elements for Every Page 329
Page Size (and Screen Resolution) 330
Fixed-Width vs. Liquid Designs 331
Designing Pages 337
Sketching the Placement of Elements 337
Introducing the Style 339
Navigation 342
Home Pages 345
Content Pages 345
Structuring Pages 346
Single-Column Layouts 348
Two-Column Layouts 350
Three-Column Layouts 353
Sacrificial Columns 354
Advanced Layout Using CSS 356
Creating a Layout Using Nested Tables 356
Summary 359
Exercises 359
xviii
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xix
Contents
Shading Multiple Rows of a Table 378
Forms 380
Before Designing the Form 380
Designing the Form 382
Summary 401
Exercises 401
xix
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xx
Contents
for 434
Infinite Loops and the break Statement 435
Events 435
Built-in Objects 437
String 437
Date 441
Math 444
Array 446
Window 447
Writing JavaScript 449
A Word About Data Types 450
Keywords 451
Summary 451
Exercises 452
xx
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xxi
Contents
When Not to Use JavaScript 496
Drop-Down Navigation Menus 497
Hiding Your E-mail Address 497
Quick Jump Select Boxes 497
Anything the User Requires from Your Site 497
Summary 498
Exercises 498
xxi
59313ftoc.qxd:WroxPro 3/22/08 2:31 PM Page xxii
Contents
Appendix A: Answers to Exercises 539
Index 715
xxii
59313flast.qxd:WroxPro 3/22/08 2:31 PM Page xxiii
Introduction
There are a lot of books about designing and building web pages, so thank you for picking up this one.
Why do I think it is different? Well, the Web has been around for over a decade now, and during its life
many technologies have been introduced to help you create web pages, some of which have lasted, others
of which have disappeared. Many books that teach you to write web pages are revisions of earlier versions
of the same book and therefore still take the same approach as the previous edition did. The purpose of
this book, however, is to teach you how to create pages for the Web as it is today and will be for the next
few years. Then, once you have worked through this book, it should continue to serve as a helpful refer-
ence text you can keep nearby and dip into when you need to.
At one time, you needed to learn only one language to write web pages: HTML. As the Web has advanced,
however, so have the technologies you need to learn in order to create effective and attractive web pages.
As the title of this book suggests, you will be learning a few different languages:
❑ HTML and XHTML: HTML and XHTML are needed to explain the structure of any web pages.
They’re used to indicate what text should be considered a heading, where paragraphs start and
end, and what images should appear in the document, and to specify links between different
pages. As you might be relieved to hear, you shouldn’t think of HTML and XHTML as two sep-
arate languages. Rather, you can consider XHTML as more like the latest version of HTML.
❑ CSS: CSS is used to control how a document should appear. For example, you can use it to spec-
ify that a typeface should be a large, bold, Arial typeface or that the background of a page should
be a light green. It can also be used to control where different items appear on a page. For example,
you can use CSS to present text in two columns on the same page.
❑ JavaScript: You learn a little bit of JavaScript to add interactivity to the web pages you create, and
to work with the browser displaying the web page.
Despite the fact that you are looking at several languages, not just HTML, you can consider it a very good
time to be coming to the Web because many of the technologies used to create web pages have matured,
and favored methods, or “best practices,” for creating web sites have been emerging. It is these that you
will be learning.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.