100% found this document useful (1 vote)
7 views

Building iPhone Apps with HTML CSS and JavaScript Making App Store Apps Without Objective C or Cocoa 1st Edition Jonathan Stark download

The document is a promotional overview of the book 'Building iPhone Apps with HTML, CSS, and JavaScript' by Jonathan Stark, which guides readers on creating iPhone applications without using Objective-C or Cocoa. It outlines the contents of the book, including topics like web app development, styling, animation, client-side data storage, and submission to the App Store. The author shares personal experiences and frustrations with native app development, advocating for web technologies as a more accessible alternative.

Uploaded by

aboesomoki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
7 views

Building iPhone Apps with HTML CSS and JavaScript Making App Store Apps Without Objective C or Cocoa 1st Edition Jonathan Stark download

The document is a promotional overview of the book 'Building iPhone Apps with HTML, CSS, and JavaScript' by Jonathan Stark, which guides readers on creating iPhone applications without using Objective-C or Cocoa. It outlines the contents of the book, including topics like web app development, styling, animation, client-side data storage, and submission to the App Store. The author shares personal experiences and frustrations with native app development, advocating for web technologies as a more accessible alternative.

Uploaded by

aboesomoki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Building iPhone Apps with HTML CSS and

JavaScript Making App Store Apps Without


Objective C or Cocoa 1st Edition Jonathan Stark
pdf download
https://ebookname.com/product/building-iphone-apps-with-html-css-
and-javascript-making-app-store-apps-without-objective-c-or-
cocoa-1st-edition-jonathan-stark/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Building Android Apps with HTML CSS and JavaScript 2nd


Edition Jonathan Stark

https://ebookname.com/product/building-android-apps-with-html-
css-and-javascript-2nd-edition-jonathan-stark/

Essential App Engine Building High Performance Java


Apps with Google App Engine 1st Edition Adriaan De
Jonge

https://ebookname.com/product/essential-app-engine-building-high-
performance-java-apps-with-google-app-engine-1st-edition-adriaan-
de-jonge/

Beginning iPhone and iPad Web Apps Scripting with HTML5


CSS3 and JavaScript 1st Edition Chris Apers

https://ebookname.com/product/beginning-iphone-and-ipad-web-apps-
scripting-with-html5-css3-and-javascript-1st-edition-chris-apers/

2 D and 3 D Image Registration for Medical Remote


Sensing and Industrial Applications 1st Edition A.
Ardeshir Goshtasby

https://ebookname.com/product/2-d-and-3-d-image-registration-for-
medical-remote-sensing-and-industrial-applications-1st-edition-a-
ardeshir-goshtasby/
Stuka vol 2 Luftwaffe Ju 87 Dive Bomber Units 1942 1945
1st Edition Peter C. Smith

https://ebookname.com/product/stuka-vol-2-luftwaffe-ju-87-dive-
bomber-units-1942-1945-1st-edition-peter-c-smith/

Dawn for Islam in Eastern Nigeria A History of the


Arrival of Islam in Igboland 1st Edition Egodi Uchendu

https://ebookname.com/product/dawn-for-islam-in-eastern-nigeria-
a-history-of-the-arrival-of-islam-in-igboland-1st-edition-egodi-
uchendu/

The Assyrian dictionary of the Oriental Institute of


the University of Chicago 18 T 1st Edition Ignace J.
Gelb

https://ebookname.com/product/the-assyrian-dictionary-of-the-
oriental-institute-of-the-university-of-chicago-18-t-1st-edition-
ignace-j-gelb/

Balkans into Southeastern Europe 1914 2014 A Century of


War and Transition 2nd Edition Lampe

https://ebookname.com/product/balkans-into-southeastern-
europe-1914-2014-a-century-of-war-and-transition-2nd-edition-
lampe/

100 Ways of Seeing an Unequal World Sutcliffe

https://ebookname.com/product/100-ways-of-seeing-an-unequal-
world-sutcliffe/
The Philosophical Theology of Jonathan Edwards Expanded
Edition Sang Hyun Lee

https://ebookname.com/product/the-philosophical-theology-of-
jonathan-edwards-expanded-edition-sang-hyun-lee/
Building iPhone Apps with HTML, CSS, and
JavaScript
Building iPhone Apps with HTML,
CSS, and JavaScript

Jonathan Stark

Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo


Building iPhone Apps with HTML, CSS, and JavaScript
by Jonathan Stark

Copyright © 2010 Jonathan Stark. All rights reserved.


Printed in the United States of America.

Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.

O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (http://my.safaribooksonline.com). For more information, contact our
corporate/institutional sales department: (800) 998-9938 or [email protected].

Editor: Brian Jepson Indexer: Fred Brown


Production Editor: Sumita Mukherji Cover Designer: Karen Montgomery
Copyeditor: Emily Quill Interior Designer: David Futato
Proofreader: Sada Preisch Illustrator: Robert Romano

Printing History:
January 2010: First Edition.

Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Building iPhone Apps with HTML, CSS, and JavaScript, the image of a bluebird, and
related trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.

While every precaution has been taken in the preparation of this book, the publisher and author assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0
United States License.

TM

This book uses RepKover™, a durable and flexible lay-flat binding.

ISBN: 978-0-596-80578-4

[M]

1262957633
To Erica—and that little jumping bean in her
tummy.
Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

1. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Web Apps Versus Native Apps 1
What Is a Web App? 1
What Is a Native App? 1
Pros and Cons 2
Which Approach Is Right for You? 2
Web Programming Crash Course 3
Intro to HTML 3
Intro to CSS 6
Intro to JavaScript 9

2. Basic iPhone Styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13


First Steps 14
Preparing a Separate iPhone Stylesheet 16
Controlling the Page Scaling 17
Adding the iPhone CSS 19
Adding the iPhone Look and Feel 21
Adding Basic Behavior with jQuery 23
What You’ve Learned 28

3. Advanced iPhone Styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29


Adding a Touch of Ajax 29
Traffic Cop 29
Simple Bells and Whistles 34
Roll Your Own Back Button 40
Adding an Icon to the Home Screen 46
Full Screen Mode 48
Changing the Status Bar 48
Providing a Custom Startup Graphic 49

vii
What You’ve Learned 50

4. Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
With a Little Help from Our Friend 51
Sliding Home 51
Adding the Dates Panel 55
Adding the Date Panel 56
Adding the New Entry Panel 58
Adding the Settings Panel 60
Putting It All Together 62
Customizing jQTouch 64
What You’ve Learned 67

5. Client-Side Data Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69


localStorage and sessionStorage 69
Saving User Settings to localStorage 70
Saving the Selected Date to sessionStorage 73
Client-Side Database 74
Creating a Database 75
Inserting Rows 78
Selecting Rows and Handling Result Sets 82
Deleting Rows 86
What You’ve Learned 89

6. Going Offline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
The Basics of the Offline Application Cache 91
Online Whitelist and Fallback Options 94
Creating a Dynamic Manifest File 98
Debugging 102
The JavaScript Console 103
The Application Cache Database 107
What You’ve Learned 113

7. Going Native . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115


Intro to PhoneGap 115
Using the Screen’s Full Height 121
Customizing the Title and Icon 123
Creating a Startup Screen 130
Installing Your App on the iPhone 131
Controlling the iPhone with JavaScript 136
Beep, Vibrate, and Alert 136
Geolocation 140
Accelerometer 146

viii | Table of Contents


What You’ve Learned 150

8. Submitting Your App to iTunes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151


Creating an iPhone Distribution Provisioning Profile 151
Installing the iPhone Distribution Provisioning Profile 153
Renaming the Project 155
Prepare the Application Binary 156
Submit Your App 157
While You Wait 159
Further Reading 159

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Table of Contents | ix
Preface

Like millions of people, I fell in love with my iPhone immediately. Initially, web apps
were the only way to get a custom app on the device, which was fine by me because
I’m a web developer. Months later when the App Store was announced, I was jacked.
I ran out and bought every Objective-C book on the market. Some of my web apps
were already somewhat popular, and I figured I’d just rewrite them as native apps, put
them in the App Store, and ride off into the sunset on a big, galloping pile of money.
Disillusionment followed. I found it difficult to learn Objective-C, and I was turned off
by the fact that the language was of little use outside of Mac programming. Xcode and
Interface Builder were pretty slick, but they weren’t my normal authoring environment
and I found them hard to get accustomed to. I was infuriated by the hoops I had to
jump through just to set up my app and iPhone for testing. The process of getting the
app into the App Store was even more byzantine. After a week or two of struggling with
these variables, I found myself wondering why I was going to all the trouble. After all,
my web apps were already available worldwide—why did I care about being in the App
Store?
On top of all this, Apple can—and does—reject apps. This is certainly their prerogative,
and maybe they have good reasons. However, from the outside, it seems capricious and
arbitrary. Put yourself in these shoes (based on a true story, BTW): you spend about
100 hours learning Objective-C. You spend another 100 hours or so writing a native
iPhone app. Eventually, your app is ready for prime time and you successfully navigate
the gauntlet that is the App Store submission process. What happens next?
You wait. And wait. And wait some more. We are talking weeks, and sometimes
months. Finally you hear back! And...your app is rejected. Now what? You have noth-
ing to show for your effort. The bubble.
But wait, it can get worse. Let’s say you do get your app approved. Hundreds or maybe
thousands of people download your app. You haven’t received any money yet, but you
are on cloud nine. Then, the bug reports start coming in. You locate and fix the bug in
minutes, resubmit your app to iTunes, and wait for Apple to approve the revision. And
wait. And wait some more. Angry customers are giving you horrible reviews in the App
Store. Your sales are tanking. And still you wait. You consider offering a refund to the

xi
angry customers, but there’s no way to do that through the App Store. So you are
basically forced to sit there watching your ratings crash even though the bug was fixed
days or weeks ago.
Sure, this story is based on the experience of one developer. Maybe it’s an edge case
and the actual data doesn’t bear out my thesis. But the problem remains: we developers
have no access to Apple’s data, or the real details of the App Store approval process.
Until that changes, building a native app with Objective-C is a risky proposition.
Fortunately, there is an alternative. You can build a web app using open source,
standards-based web technologies, release it as a web app, and debug and test it under
load with real users. Once you are ready to rock, you can use PhoneGap to convert
your web app to a native iPhone app and submit it to the App Store. If it’s ultimately
rejected, you aren’t dead in your tracks because you can still offer the web app. If it’s
approved, great! You can then start adding features that enhance your web app by
taking advantage of the unique hardware features available on the device. Sounds like
the best of both worlds, right?

Who Should Read This Book


I’m going to assume that you have some basic experience reading and writing HTML,
CSS, and JavaScript (jQuery in particular). I will be including some basic SQL code in
Chapters 5 and 6, so a passing familiarity with SQL syntax would be helpful but is not
required.

What You Need to Use This Book


This book is going to avoid the iPhone SDK wherever possible. All you’ll need to follow
along with the vast majority of examples is a text editor and the most recent version of
Safari (or better yet, WebKit, which is a more cutting-edge version of Safari that’s
available for both Mac and Windows at http://webkit.org). You do need a Mac for the
PhoneGap material in Chapter 7, where I explain how to convert your web app into a
native app that you can submit to the App Store.

Conventions Used in This Book


The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements
such as variable or function names, databases, data types, environment variables,
statements, and keywords.

xii | Preface
Constant width bold
Shows commands or other text that should be typed literally by the user and for
emphasis within code listings.
Constant width italic
Shows text that should be replaced with user-supplied values or by values deter-
mined by context.

This icon signifies a tip, suggestion, or general note.

This icon indicates a warning or caution.

Using Code Examples


This book is here to help you get your job done. In general, you may use the code in
this book in your programs and documentation. You do not need to contact us for
permission unless you’re reproducing a significant portion of the code. For example,
writing a program that uses several chunks of code from this book does not require
permission. Selling or distributing a CD-ROM of examples from O’Reilly books does
require permission. Answering a question by citing this book and quoting example
code does not require permission. Incorporating a significant amount of example code
from this book into your product’s documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the
title, author, publisher, and ISBN. For example: “Building iPhone Apps with
HTML, CSS, and JavaScript by Jonathan Stark. Copyright 2010 Jonathan Stark,
978-0-596-80578-4.”
If you feel your use of code examples falls outside fair use or the permission given above,
feel free to contact us at [email protected].

Safari® Books Online


Safari Books Online is an on-demand digital library that lets you easily
search over 7,500 technology and creative reference books and videos to
find the answers you need quickly.
With a subscription, you can read any page and watch any video from our library online.
Read books on your cell phone and mobile devices. Access new titles before they are
available for print, and get exclusive access to manuscripts in development and post

Preface | xiii
feedback for the authors. Copy and paste code samples, organize your favorites, down-
load chapters, bookmark key sections, create notes, print out pages, and benefit from
tons of other time-saving features.
O’Reilly Media has uploaded this book to the Safari Books Online service. To have full
digital access to this book and others on similar topics from O’Reilly and other pub-
lishers, sign up for free at http://my.safaribooksonline.com.

How to Contact Us
Please address comments and questions concerning this book to the publisher:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)
We have a web page for this book, where we list errata, examples, and any additional
information. You can access this page at:
http://www.oreilly.com/catalog/9780596805784/
To comment or ask technical questions about this book, send email to:
[email protected]
For more information about our books, conferences, Resource Centers, and the
O’Reilly Network, see our website at:
http://www.oreilly.com

Acknowledgments
Writing a book is a team effort. My heartfelt thanks go out to the following people for
their generous contributions.
Tim O’Reilly, Brian Jepson, and the rest of the gang at ORM for making the experience
of writing this book so rewarding and educational.
Jack Templin, Providence Geeks, and RI Nexus for introducing me to the thriving tech
scene in my own hometown. This book wouldn’t exist if it weren’t for Providence
Geeks.
David Kandeda for his wonderfully obsessive pursuit of beauty. Whether it’s a bit of
code, or a user interface animation, he can’t sleep until it’s perfect, and I love that.
Brian LeRoux, Brock Whitten, Rob Ellis, and the rest of the gang at Nitobi for creating
and continuing to support PhoneGap.

xiv | Preface
Brian Fling for broadening my view of mobile beyond just the latest and greatest hard-
ware. Brian knows mobile from back in the day; he’s a wonderful writer, and on top
of that, a very generous guy.
PPK, John Gruber, John Allsopp, and John Resig for their contributions to and support
of the underlying technologies that made this book possible.
Garrett Murray, Brian LeRoux, and the swarm of folks who generously posted com-
ments and questions on the OFPS site for this book. Your feedback was very helpful
and much appreciated.
Kazu, Chuckie, Janice, Chris, and the rest of the gang at Haruki for being so accom-
modating while I endlessly typed away at the high top by the door.
My wonderful family, friends, and clients for being understanding and supportive while
I was chained to the keyboard.
And finally, Erica. You make everything possible. I love you!

Preface | xv
CHAPTER 1
Getting Started

Before we dive in and start building applications for the iPhone, I’d like to quickly
establish the playing field. In this chapter, I’ll define key terms, compare the pros and
cons of the two most common development approaches, and present a crash course in
the three core web technologies that are used in this book.

Web Apps Versus Native Apps


First, I’ll define what I mean by “web app” and “native app” and consider the pros and
cons of each.

What Is a Web App?


To me, a web app is basically a website that is specifically optimized for the iPhone.
The site can be anything from a standard small-business brochure site to a mortgage
calculator to a daily calorie tracker—the content is irrelevant. The defining character-
istics of a web app are that the user interface is built with web-standard technologies,
it is available at a URL (public, private, or behind a login), and it is optimized for the
specifics of the iPhone. A web app is not installed on the phone, is not available in the
iTunes App Store, and is not written with Objective-C.

What Is a Native App?


In contrast, native apps are installed on the iPhone, have access to the hardware (speak-
ers, accelerometer, camera, etc.), and are written with Objective-C. The defining char-
acteristic of a native app, however, is that it’s available in the iTunes App Store—a
feature that has captured the imagination of hordes of software entrepreneurs world-
wide, myself included.

1
Pros and Cons
Different applications have different requirements. Some apps are a better fit with web
technologies than others. Knowing the pros and cons of each approach will help you
make the right decision about which path is appropriate for your situation.
Here are the pros of native app development:
• Millions of registered credit card owners are one click away.
• Xcode, Interface Builder, and the Cocoa Touch framework constitute a pretty
sweet development environment.
• You can access all the cool hardware features of the device.
Here are the cons of native app development:
• You have to pay to become an Apple developer.
• You are at the mercy of the Apple approval process.
• You have to develop using Objective-C.
• You have to develop on a Mac.
• You can’t release bug fixes in a timely fashion.
• The development cycle is slow, and the testing cycle is constrained by the App
Store’s limitations.
Here are the pros of web app development:
• Web developers can use their current authoring tools.
• You can use your current web design and development skills.
• You are not limited to developing on the Mac OS.
• Your app will run on any device that has a web browser.
• You can fix bugs in real time.
• The development cycle is fast.
Here are the cons of web app development:
• You cannot access the all cool hardware features of the phone.
• You have to roll your own payment system if you want to charge for the app.
• It can be difficult to achieve sophisticated UI effects.

Which Approach Is Right for You?


Here’s where it gets exciting. The always-online nature of the iPhone creates an envi-
ronment in which the lines between a web app and a native app get blurry. There are
even some little-known features of the iPhone that allow you to take a web app offline
if you want (see Chapter 6). What’s more, several third-party projects—of which

2 | Chapter 1: Getting Started


PhoneGap is the most notable—are actively developing solutions that allow web de-
velopers to take a web app and package it as a native app for the iPhone and other
mobile platforms.
For me, this is the perfect blend. I can write in my native language, release a product
as a pure web app (for the iPhone and any other devices that have a modern browser)
without going through Apple’s approval process, and use the same codebase to create
an enhanced native version that can access the device hardware and potentially be sold
in the App Store. And if Apple rejects it? No big deal, because I still have my online
version. I can keep working on the native version while customers use the web app.

Web Programming Crash Course


The three main technologies we are going to use to build web apps are HTML, CSS,
and JavaScript. I’d like to quickly cover each to make sure we’re all on the same page
before plowing into the fancy stuff.

Intro to HTML
When you’re browsing the Web, the pages that you are viewing are just text documents
sitting on someone else’s computer. The text in a typical web page is wrapped in HTML
tags, which tell your browser about the structure of the document. With this informa-
tion, the browser can decide how to display the information in a way that makes sense.
Consider the web page snippet shown in Example 1-1. On the first line, the string Hi
there! is wrapped in a pair of h1 tags. (Notice that the open tag and the close tag are
slightly different: the close tag has a slash as the second character, while the open tag
does not.)
Wrapping some text in h1 tags tells the browser that the words enclosed are a heading,
which will cause it to be displayed in large bold text on its own line. There are also
h2, h3, h4, h5, and h6 heading tags. The lower the number, the more important the
header, so text wrapped in an h6 tag will be smaller (i.e., less important-looking) than
text wrapped in an h3 tag.
After the h1 tag in Example 1-1 are two lines wrapped in p tags. These are called para-
graph tags. Browsers will display each paragraph on its own line. If the paragraph is
long enough to exceed the width of the browser window, the text will bump down and
continue on the next line. In either case, a blank line will be inserted after the paragraph
to separate it from the next item on the page.
Example 1-1. HTML snippet
<h1>Hi there!</h1>
<p>Thanks for visiting my web page.</p>
<p>I hope you like it.</p>

Web Programming Crash Course | 3


You can also put HTML tags inside of other HTML tags. Example 1-2 shows an un-
ordered list (ul) tag that contains three list items (li). In a browser, this would show
up as a bulleted list, with each item on its own line. When you have a tag or tags inside
of another tag, the inner tags are called child elements, or children, of the parent tag.
So in this example, the lis are children of the ul parent.
Example 1-2. Unordered list
<ul>
<li>Pizza</li>
<li>Beer</li>
<li>Dogs</li>
</ul>

The tags I’ve covered so far are all block tags. The defining characteristic of a block tag
is that it is displayed on a line of its own, with no elements to its left or right. That is
why headings, paragraphs, and list items progress down the page instead of across it.
The opposite of a block tag is an inline tag, which, as the name implies, can appear in
a line. The emphasis tag (em) is an example of an inline tag, and it looks like this:
<p>I <em>really</em> hope you like it.</p>

The granddaddy of the inline tags—and arguably the coolest feature of HTML—is the
a tag. The a stands for anchor, but I’ll also refer to the tag as a link or hyperlink. Text
wrapped in an anchor tag becomes clickable, such that clicking on it causes your
browser to load a new HTML page.
In order to tell the browser what new page to load, we have to add what’s called an
attribute to the tag. Attributes are named values that are inserted into an open tag. In
an anchor tag, you use the href attribute to specify the location of the target page. Here’s
a link to Google’s home page:
<a href="http://www.google.com/">Google</a>

That might look like a bit of a jumble if you are not used to reading HTML, but you
should be able to pick out the URL for the Google home page. You’ll be seeing a lot of
a tags and hrefs throughout the book, so take a minute to get your head around this if
it doesn’t make sense at first glance.

There are a couple of things to keep in mind regarding attributes. Dif-


ferent HTML tags allow different attributes. You can add multiple at-
tributes to an open tag by separating them with spaces. You never add
attributes to a closing tag. There are hundreds of possible combinations
of attributes and tags, but don’t sweat it. We only have to worry about
a dozen or so in this book.

4 | Chapter 1: Getting Started


The HTML snippet that we’ve been looking at would normally reside in the body section
of a complete HTML document. An HTML document is made up of two sections: the
head and the body. The body is where you put all the content that you want users to
see. The head contains information about the page, most of which is invisible to the
user.
The body and head are always wrapped in an html element. Example 1-3 shows the
snippet in the context of a proper HTML document. For now the head section contains
a title element, which tells the browser what text to display in the title bar of the
window.
Example 1-3. A proper HTML document
<html>
<head>
<title>My Awesome Page</title>
</head>
<body>
<h1>Hi there!</h1>
<p>Thanks for visiting my web page.</p>
<p>I hope you like it.</p>
<ul>
<li>Pizza</li>
<li>Beer</li>
<li>Dogs</li>
</ul>
</body>
</html>

Normally, when you are using your web browser you are viewing pages that are hosted
on the Internet. However, browsers are perfectly good at displaying HTML documents
that are on your local machine as well. To see what I mean, crack open a text editor
and type up Example 1-3. When you are done, save it to your desktop as test.html and
then open it with Safari by either dragging the file onto the Safari application icon or
opening Safari and selecting File→Open File. Double-clicking test.html might work as
well, but it could open in your text editor or another browser depending on your
settings.

Even if you aren’t running Mac OS X, you should use Safari when testing
your iPhone web apps on a desktop web browser, because Safari is the
closest desktop browser to the iPhone’s Mobile Safari. Safari for Win-
dows is available from http://www.apple.com/safari/.

Web Programming Crash Course | 5


Some text editors are bad for authoring HTML. In particular, you want
to avoid editors that support rich text editing, like Microsoft Word or
TextEdit. These types of editors can save their files in formats other than
plain text, which will break your HTML. If you are in the market for a
good text editor, my favorite by far on the Mac is TextMate (http://
macromates.com/), and I hear that there is a clone version for Windows
called E Text Editor (http://www.e-texteditor.com/). If free is your thing,
you can download Text Wrangler for Mac (http://www.barebones.com/
products/TextWrangler/) or use the built-in Notepad on Windows.

Intro to CSS
As you’ve seen, browsers render certain HTML elements with distinct styles (headings
are large and bold, paragraphs are followed by a blank line, etc.). These styles are very
basic and are primarily intended to help the reader understand the structure and mean-
ing of the document.
To go beyond this simple structure-based rendering, you can use Cascading Style Sheets
(CSS). CSS is a stylesheet language that is used to define the visual presentation of an
HTML document. You can use CSS to define simple things like the text color, size, and
style (bold, italic, etc.), or complex things like page layout, gradients, opacity, and much
more.
Example 1-4 shows a CSS rule that instructs the browser to display any text in the body
element using the color red. In this example, body is the selector (what is affected by the
rule) and the curly braces enclose the declaration (the rule itself). The declaration in-
cludes a set of properties and their values. In this example, color is the property, and
red is the value of the property.

Example 1-4. A simple CSS rule


body { color: red; }

Property names are predefined in the CSS specification, which means that you can’t
just make them up. Each property expects an appropriate value, and there can be lots
of appropriate values and value formats for a given property.
For example, you can specify colors with predefined keywords like red, or by using
HTML color code notation. This uses a hexadecimal notation: three pairs of hexadec-
imal digits (0–F) representing (from left to right) Red, Green, and Blue values. Proper-
ties that expect measurements can accept values like 10px, 75%, and 1em. Example 1-5
shows some common declarations. (The color code shown for background-color cor-
responds to the CSS “gray”.)
Example 1-5. Some common CSS declarations
body {
color: red;
background-color: #808080;

6 | Chapter 1: Getting Started


font-size: 12px;
font-style: italic;
font-weight: bold;
font-family: Arial;
}

Selectors come in a variety of flavors. If you wanted all of your hyperlinks (the a element)
to display in italics, you would add the following to your stylesheet:
a { font-style: italic; }

If you wanted to be more specific and only italicize the hyperlinks that were contained
somewhere within an h1 tag, you would add the following to your stylesheet:
h1 a { font-style: italic; }

You can also define your own custom selectors by adding id and/or class attributes to
your HTML tags. Consider the following HTML snippet:
<h1 class="loud">Hi there!</h1>
<p id="highlight">Thanks for visiting my web page.</p>
<p>I hope you like it.</p>
<ul>
<li class="loud">Pizza</li>
<li>Beer</li>
<li>Dogs</li>
</ul>

If I added .loud { font-style: italic; } to the CSS for this HTML, Hi there! and
Pizza would show up italicized because they both have the loud class. The dot in front
of the .loud selector is important. It’s how the CSS knows to look for HTML tags with
a class of loud. If you omit the dot, the CSS would look for a loud tag, which doesn’t
exist in this snippet (or in HTML at all, for that matter).
Applying CSS by id is similar. To add a yellow background fill to the highlight para-
graph tag, you’d use this rule:
#highlight { background-color: yellow; }

Here, the # symbol tells the CSS to look for an HTML tag with the id highlight.
To recap, you can opt to select elements by tag name (e.g., body, h1, p), by class name
(e.g., .loud, .subtle, .error), or by id (e.g., #highlight, #login, #promo). And you can
get more specific by chaining selectors together (e.g., h1 a, body ul .loud).

There are differences between class and id. class attributes should be
used when you have more than one item on the page with the same
class value. Conversely, id values have to be unique to a page.
When I first learned this, I figured I’d just always use class attributes
so I wouldn’t have to worry about whether I was duping an id value.
However, selecting elements by id is much faster than selecting them
by class, so you can hurt your performance by overusing class selectors.

Web Programming Crash Course | 7


Exploring the Variety of Random
Documents with Different Content
that the correspondents were enjoying themselves enormously at
the expense of the State, and she shuddered at the grotesque sense
of humor which she discovered amongst her thoughts at this
moment.
The Channel-crossing on the troop-ship brought her nearer yet.
There was hardly standing-room on any of the decks, and the
spectacle was a very strange one, for all the crowded ranks in khaki,
officers and men, had been ordered to wear life-belts. A hospital
ship which had just arrived was delivering its loads of wounded men
to the docks, and these also were wearing life-belts.
The sunset-light was fading as the troop-ship moved out, and the
seas had that peculiar iridescent smoothness, as of a delicately
tinted skin of very faintly burning oils, which they so often wear
when the wind falls at evening. On one side of the ship a destroyer
was plowing through white mounds of foam; and overhead there
was one of the new silver-skinned scouting air-ships.
Away to the east, a great line of transports was returning home with
the wounded, and the horizon was one long stream of black smoke.
It was all so peaceful that the life-belts seemed an anomaly, and it
was difficult to realize the full meaning of this traffic. The white cliffs
of England wore a spiritual aspect that only the hour and its grave
significance could lend them; and May Margaret thought that
England had never looked so beautiful. There were other troop-ships
all crowded, about to follow, and their cheers came faintly across the
water. The throb of the engines carried May Margaret's ship away
rhythmically, and somewhere on the lower deck a mouth organ
began playing, almost inaudibly, "It's a Long, Long Way to
Tipperary." The troops were humming the tune, too softly for it to be
called singing, and it all blended with the swish of the water and the
hum of the engine-room, like a memory of other voices, lost in
France and Flanders. May Margaret looked down at the faces. They,
too, were grave and beautiful with evening light; and the brave
unquestioning simplicity of it all seemed to her an inexpressibly
noble thing. She thought for a moment that no pipes among the
mists of glen or mountain, no instrument on earth, ever had the
beauty of that faint music. It was one of those unheard melodies
that are better than any heard. The sea bore the burden. The winds
breathed it in undertone; and its message was one of a peace that
she could not understand. Perhaps, under and above all the
tragedies of the hour, the kingdom of heaven was there.
The cliffs became ghostly in the distance, and suddenly on the dusky
waters astern there shone a great misty star. It was the first flash of
the shore searchlights, and May Margaret watched it flashing long
after the English coast had disappeared. Then she lost the
searchlight also; and the transport was left, with the dark destroyer,
to find its way, through whatever perils there might be, to the
French coast. Millions of men—she had read it—had been
transported, despite mines and submarines, without the loss of a
single life. She had often wondered how it was possible. Now she
saw the answer.
A little black ship loomed up ahead of them and flashed a signal to
their escort. Far through the dusk she saw them, little black trawlers
and drifters, Lizzie and Maggie and Betsy Jane, signaling all that
human courage could discover, of friend or foe, on the face of the
waters or under them.
In a very short time they caught the first glimpse of the searchlights
on the French coast; and, soon afterwards, they drew into a dark
harbor, amid vague cheerings and occasional bursts of the
"Marseillaise" from wharves thronged with soldiers of a dozen
nationalities. A British officer edged his way through the crowd
below them on the quay, and waved his hand to Julian Sinclair.
"Ah, there's our military guide, Captain Crump. Now, if you'll follow
me and keep together, we'll get our passports examined quickly, and
join him," said the latter, obviously relieved at the prospect of
sharing his neutrals with a fellow-countryman.
There followed a brief, but very exact, scrutiny and stamping of
papers by an aquiline gentleman whose gold-rimmed spectacles
suggested a microscopical carefulness; a series of abrupt
introductions to Captain Crump on the gloomy wharf; a hasty bite
and sup in a station restaurant, where blue uniforms mingled with
khaki, and some red-tabbed British staff-officers, at the next table,
were drinking wine with some turbaned Indian Princes. It was a
strange glimpse of color and light rifting the darkness for a moment.
Then they followed Captain Crump again, through great tarpaulined
munition-dumps and loaded motor-lorries, to the two motor-cars
behind the station. In these they were whirled, at forty miles an
hour, along one of the poplar-bordered roads of France that seemed
to-night as ghostly as those titanic alleys of Ulalume, in the song of
May Margaret's national poet. Once or twice, as they passed through
a cluster of cottages, the night-wind brought a whiff of iodoform,
and reminded her that flesh and blood were fighting with pain and
death somewhere in that darkness.
Every few minutes they passed troops of dark marching men.
Several times it seemed to her that she recognized the face for
which she was looking, in some momentary glimmer of starlight.
At last they reached the village where the guests of G. H. Q. were to
be quartered. The foreigners were assigned to the château which
was used as a guest-house; but there had been one or two
unexpected arrivals, and Captain Crump asked the American
correspondent if he would mind occupying a room in the house of
the curé, a hundred yards away up the village street. The American
correspondent was exceedingly glad to do so, and was soon
engaged in attempts at conversation with the friendly old man in the
black cassock who did his best to make her welcome. There were no
more difficulties for her that night, except that the curé had very
limited notions as to the amount of water she required for washing.
They set out early the next morning on their way to that part of the
front which she had particularly asked to see. The long straight
poplar-bordered road, bright with friendly sunshine now, absorbed
her. She heard the chatter of the correspondents at her side as in a
dream.
"Have you read Anatole France?" said the Spaniard. (He was anxious
for improving conversation, and wore a velvet coat totally unsuited
to the expedition.) But May Margaret's every thought was plodding
along with the plodding streams of dusty, footsore men, in steel
hats, and she did not answer. She pointed vaguely to the women
working in the fields to save the harvest, and the anti-aircraft guns
that watched the sky from behind the sheaves. At every turn she
saw something that reminded her of things she had seen before, in
some previous existence, when she had lived in the life of her lover
and traveled through it all with his own eyes. She was passing
through his existence again. He was part of all this: these camps by
the roadside, where soldiers, brown as gipsies, rambled about with
buckets; these endless processions of motor-lorries, with men and
munitions and guns all streaming to the north on every road, as if
whole nations were setting out on a pilgrimage and taking their
possessions with them; these endless processions of closed
ambulances returning, marked with the Red Cross.
Once, over a bare brown stretch of open country, a magnificent body
of Indian cavalry swept towards them, every man sitting his horse
like a prince; and the British officers, with their sun-burned faces
and dusky turbans, hardly distinguishable from their native troops.
"Glorious, aren't they?" said Sinclair, leaning back from his place
beside the chauffeur. "But they haven't had a chance yet. If only we
could get the Boches out of their burrows and loose our cavalry at
them!"
She nodded her head; but her thoughts were elsewhere. This
picturesque display seemed to belong to a bygone age; it was quite
unrelated to this war of chemists and spectacled old men who
disbelieved in chivalry, laughed at right and wrong, and had killed
the happiness of the entire world.
She noticed, whenever they passed a village or a farm-house, or
even a cattle-shed now, that the smell of iodoform brooded over
everything. All these wounded acres of France were breathing it out
like the scent of some strange new summer blossoms. A hundred
yards away from the ruined outhouses of every village she began to
breathe it. Her senses were unusually keen, but it dominated the
summer air so poignantly that she could not understand why these
meticulously vivid men—the foreign correspondents—were unaware
of it. It turned the whole countryside into a series of hospital wards;
and the Greek was now disputing with the Spaniard about home-rule
for Ireland.
At last, in the distance, they heard a new sound that enlarged the
horizon as when one approaches the sea. It was the mutter of the
guns, a deep many-toned thunder, rolling up and dying away, but
without a single break, incessant as the sound of the Atlantic in
storm.
The cars halted in what had once been a village, and was now a
rubbish heap of splinters and scarred walls and crumbling mortar.
The correspondents alighted and followed Captain Crump across a
broad open plain, pitted with shell-holes. The incessant thunder of
the guns deepened as they went.
"Don't touch anything without consulting me," snapped Crump at
the Spaniard, who was nosing round an unexploded shell and
thinking of souvenirs. "The Boches have a charming trick of leaving
things about that may go off in your hands. A chap picked up a
spiked helmet here the other day. They buried him in the graveyard
that Mr. Grant wants to see. It's a very small grave. There wasn't
much left of him."
The burial-ground lay close under a ridge of hills, and they
approached it through a maze of recently captured German
trenches. It was a strange piece of sad ordered gardening in a
devastated world. Every minute or two the flash and shock of a
concealed howitzer close at hand shook the loose earth on the
graves, but only seemed to emphasize the still sleep of this acre. It
held a great regiment of graves, mounds of fresh-turned earth in
soldierly ranks, most of them marked with tiny wooden crosses,
rough bits of kindling wood. Some of the crosses bore names,
written in pencil. There was one that bore the names of six men,
and the grave was hardly large enough for a child. They had been
blown to pieces by a single shell.
They passed through the French section first. Here there was an
austere poetry, a simplicity that approached the sublime in the
terrible regularity of the innumerably repeated inscription, "Mort
pour la France." In the British section there was a striking contrast.
There was not a word of patriotism; but, though the graves were
equally regular, an individuality of inscription that interested the
Spanish correspondent greatly.
"It is here we pass from Racine to Shakespeare," he said, pointing to
a wooden cross that bore the words:

"In loving memory of Jim,


From his old pal,
The artful dodger,
'Gone but not forgotten.'"

"No, no, no," cried the Greek correspondent, greatly excited by the
literary suggestion. "From Flaubert to Dickens! Is it not so, Captain
Crump?"
Captain Crump grunted vaguely and moved on towards the soldier in
charge. May Margaret followed him, the photograph in her hand.
"We want to find number forty-eight," said Captain Crump.
The soldier saluted and led the way to the other end of the ground.
Many of the graves here had not been named. There had evidently
been some disaster which made it difficult. Some of them carried the
identification disc.
"This is number forty-eight, sir," said the soldier, pausing before a
mound that May Margaret knew already by heart. "May I look at the
photograph, sir? Yes. You see, that's the rosary—that black thing—
round the cross."
"The rosary! I don't understand." May Margaret looked at the string
of beads on the cross that bore the name of Brian Davidson.
"I suppose he was a Roman Catholic, sir. They must have taken it
from the body."
"No, he was not a Catholic," whispered May Margaret. She felt as if
she must drop on her knees and call on the mute earth to speak, to
explain, to tell her who lay beneath.
"There must be a mistake," she said at last, and her own voice rang
in her ears like the voice of a stranger. "I must find out. How can I
find out?"
Her face was bloodless as she confronted Captain Crump.
"There's some terrible mistake," she said again. "I can't face his
people at home till I find out. He may be—" But that awful word of
hope died on her lips.
"I'll do my best," said Captain Crump. "It's very odd, certainly; but I
shouldn't—er—hope for too much. You see, if he were living, they
wouldn't have been likely to overlook it. It's possible that he may be
there, or there." He pointed to two graves without a name. "Or
again, he may be missing, of course, or a prisoner. His lot are down
at Arras now. We'll get into touch with them to-morrow and I'll make
inquiries. You want to pass a night in the trenches, don't you? I think
it can be arranged for you to go to that section to-morrow night.
Then we can kill two birds with one stone."
May Margaret thanked him. Behind them, she heard, with that
strange sense of double meanings which the most commonplace
accidents of life can awake at certain moments—the voice of one of
the correspondents, still arguing with the others. "Here, if you like, is
Shakespeare," he said:

"How should I your true love know


From another one."

The quotation, lilted inanely as a nursery rime, pierced her heart like
a flight of silver arrows.
"You have not a very pleasant business," the correspondent
continued, addressing a soldier at work in an open grave.
"I've 'ad two years in the trenches, sir, and I'm glad to get it," he
replied.
"Little Christian crosses, planted against the heathen, creeping
nearer and nearer to the Rhine," murmured Julian Sinclair, on the
other side of May Margaret.
The multiplicity of the ways in which it seemed possible for both
soldiers and civilians to regard the war was beginning to rob her of
the power to think.
On their way back, through the dusk, they passed a body of men
marching to the trenches, with a song that she had heard Brian
humming:

"Fat Fritz went out, all camouflaged, like a beautiful bumble-bee,


With daffodil stripes and 'airy legs to see what he could see,
By the light of the moon, in No Man's Land, he climbed an apple tree
And he put on his big round spectacles, to look for gay Paree.

But I don't suppose he'll do it again


For months, and months, and months;
But I don't suppose he'll do it again
For months, and month, and months;
For Archie is only a third class shot,
But he brought him down at once,
AND

I don't suppose he'll do it again


For months, and months, and months."
Soon afterwards, with all these themes interchanging in her
bewildered mind, May Margaret heard Julian Sinclair calling through
the dark from the car ahead: "Take a good look at the next village;
it's called Crécy." The stars that watched the ancient bowmen had
nothing new to tell her; but a few minutes later, as another body of
troops came tramping through the dark to another stanza of their
song, there seemed to be an ancient and unconquerable mass of
marching harmonies within the lilt of the Cockney ballad; like the
mass of the sea behind the breaking wave:

"'E called 'em the Old Contemptibles,


But 'e only did it once,
And I don't suppose 'e'll do it again,
For months, and months, and months."

They dined at the château, and she slipped away early to the house
of the curé. Before she slept, she took out Brian's last letter and
read it. She sat on the narrow bed, under the little black crucifix with
the ivory Christ looking down at her from the bare wall. She was
glad that it was there; for it embodied the master-thought of that
day's pilgrimage. Never before had she realized how that symbol
was dominating this war; how it was repeated and repeated over
thousands of acres of young men's graves; and with what a new
significance the wayside crosses of France were now stretching out
their arms in the night of disaster.
In Brian's letter there was very little about himself. He had always
been somewhat impatient of the "lyrical people," as he called them,
who were "so eloquently introspective" about the war, and he had
carried his prejudice even into his correspondence. She was reading
his letter again to-night because she remembered that it expressed
something of her own bewilderment at the multiplicity of ways in
which people were talking and thinking of the international tragedy.
"I have heard," he wrote, "every possible kind of opinion out here,
with the exception of one. I have never heard any one suggest any
possible end for this war but the defeat of the Hun. But I have
heard, over and over again, ridicule of the idea that this war is going
to end war, or even make the world better.
"Along with that, I've often heard praise of the very militaristic
system that we are trying so hard to abolish altogether. Of course,
this is only among certain sets of men. But this war has become a
war of ideas; and ideas are not always contained or divided by the
lines of trenches. We are fighting things out amongst ourselves, in
all the belligerent countries, and the most crying need of the Allies
to-day is a leader who can crystallize their own truest thoughts and
ideals for them.
"You know what my dream was, always, in the days when I was
trying my prentice hand in literature. I wanted to help in the
greatest work of modern times—the task of bringing your country
and mine together. Our common language (and that implies so much
more than people realize) is the greatest political factor in the
modern world; and, thank God, it's beyond the reach of the
politicians. In England, we exaggerate the importance of the mere
politician. We do not realize the supreme glory of our own
inheritance; or even the practical aspects of it; the practical value of
the fact that every city and town and village over the whole of your
continent paid homage to Shakespeare during the tercentenary.
Carlyle was right when he compared that part of our inheritance
with the Indian Empire. It is in our literature that we can meet and
read each other's hearts and minds, and that has been our greatest
asset during the war. Think what it will mean when two hundred
million people, thirty years hence, in North America, are reading that
literature and sharing it. Shelley understood it. You remember what
he says in the 'Revolt of Islam.' The Germans understand, that's why
they're so anxious to introduce compulsory German into your schools
and colleges. But our own reactionaries are afraid to understand it.
"After all, this war is only a continuation of the Revolutionary war,
when the Englishmen who signed the Declaration of Independence
fought an army of hired Germans, directed by Germans. Even their
military maps were drawn up in German. It's the same war, and the
same cause, and I believe that the New World eventually will come
into it. Then we shall have a real leadership. The scheming
reactionaries in Europe will fail to keep us apart. We shall yet see
our flags united. And then despite all the sneers of the little folk, on
both sides of the Atlantic, we shall be able to suppress barbarism in
Europe and say (as you and I have said): Those whom God hath
joined let no man put asunder.
"There seems to be an epidemic of verse among the armies. I
haven't caught it very badly yet; but these were some of my
symptoms in a spare moment last week:

"How few are they that voyage through the night,


On that eternal quest,
For that strange light beyond our light,
That rest beyond our rest.

And they who, seeking beauty, once descry


Her face, to most unknown;
Thenceforth like changelings from the sky
Must walk their road alone.

So once I dreamed. So idle was my mood;


But now, before these eyes,
From those foul trenches, black with blood,
What radiant legions rise.

And loveliness over the wounded earth awakes


Like wild-flowers in the Spring.
Out of the mortal chrysalis breaks
Immortal wing on wing.

They rise like flowers, they wander on wings of light,


Through realms beyond our ken.
The loneliest soul is companied to-night
By hosts of unknown men."

II
At ten o'clock the next morning, the two cars were moving at sixty
miles an hour along a road that ran parallel with the German
trenches. There was a slight screen of canvas to hide the traffic, for
the road by Dead-Man's-Corner was not the safest way into Arras at
that time. But they reached the city without misadventure, and May
Margaret felt nearer now than ever to the secret of the quest.
No dream was ever so strange as this great echoing shell of the
deserted city where he, too, had walked so recently. He, too, had
passed along these cracked pavements, keeping close to the wall, in
order to escape observation from the enemy, whose lines ran
through one end of the city at this moment. He had seen these
pitiful interiors of shattered houses, where sometimes the whole
front had been blown away, leaving the furniture still intact on two
floors, and even pictures, a little askew, on the walls. He had seen
that little black crucifix over that bed; crossed this grass-grown
square; and gone into the shattered railway-station, where the
many-colored tickets were strewn like autumn leaves over the glass-
littered floor. The Spaniard filled his pockets with them.
They went down a narrow street to the ruins of the cathedral. On
one of the deserted houses there was a small placard advertising the
Paris edition of a London paper, the only sign of the outside world in
all that echoing solitude. The neutrals rejoiced greatly before a
deserted insurance office, which still displayed an advertisement of
its exceedingly reasonable rates for the lives of peaceful citizens.
Their merriment was stopped abruptly by a hollow boom that shook
the whole city and rumbled echoing along the deserted streets from
end to end.
"That's a Boche shell," said Crump. "It sounds as if they've got the
cathedral again."
At noon they lunched under the lee of a hill just outside Arras, that
had been drenched with blood a few weeks earlier. The great seas of
thunder ebbed and flowed incessantly from sky to sky, as if the hill
were the one firm island in the universe and all the rest were
breaking up and washing around them. The amazing incongruity of
things bewildered May Margaret again. It was more fantastic than
any dream. They sat there at ease, eating chicken, munching
sandwiches, filling their cups with red wine and white, and ending
with black coffee, piping hot from the thermos bottle. Great puffs of
brown smoke rose in the distance where our shells were dropping
along the German line. It looked as if the trees were walking out
from a certain distant wood. Little blue rings of smoke rose from the
peaceful cigarettes around her. Bees and butterflies came and went
through the sunshine; and, in the stainless blue sky overhead there
was a rush and rumor as of invisible trains passing to and fro. The
neutrals amused themselves by trying to distinguish between our
own and the enemy shells.
At two o'clock Crump rose. "I'll take you along now, Grant, if you are
ready," he said. "The rest of you wait here. I shall be back in about
ten minutes."
May Margaret stumbled after him down the hill. At the foot, a soldier
was waiting; and, hardly conscious of the fact that she had
exchanged one guide for another, she found herself plodding silently
beside him on her unchanging quest, toward the communication
trenches.
"What do they think about things in England, sir?" said her new
companion at last, with a curiously suppressed eagerness.
"They are very hopeful," said May Margaret.
"When do they think it will be over?"
"Some of them say in six months."
"Ah, yes. I've been here three years now, and they always say that.
At the end of the six months they'll say it again."
It was the first open note of depression that May Margaret had
heard. "Do most of the men feel like that?" she said.
"They don't say so, sir, but they all want it to be over." Then he
added, with the doggedness of his kind, "Not till we get what we're
fighting for, of course. You're a correspondent, sir, aren't you? Well, I
never seen the real fax put in the papers yet. There was one of
these soldier writers the other day. I saw his book in the Y. M. C. A.
hut. He said that the only time he nearly broke his heart was when
there was a rumor that Germany was asking for peace before he
was able to get into it hisself. That's what I call bloody selfish, sir. All
this poytry! (he spat into a shell-hole) making pictures out of it and
talking about their own souls. Mind you I'm all for finishing it
properly; but it ain't right, the way they look at it. It's like saying
they're glad the Belgians had their throats cut because it's taught
their own bloody selves the beauty of sacrifice. If what they say is
true, why in the hell do they want the war ever to stop at all? P'raps
if it went on for ever, we should all of us learn the bloody beauty of
it, and keep on learning it till there wasn't any one left. There was a
member of Parliament out here the other day. He saw three poor
chaps trying to wash in a mine-crater full of muddy water. Covered
with lice they was. The paper described it afterwards. The right
honorable gentleman laughed 'artily, it said, same as they say about
royalty. Always laughing 'artily. P'raps he didn't laugh. I dunno about
that. But if he did, I'd like him to 'ave a taste of the fun hisself."
They were entering the long tunnel of the communication-trench
now. The soldier went ahead, and May Margaret followed, through
smells of earth, and the reek of stale uniforms, for a mile or more,
till they came to the alert eyes along the fire-step of the front-line
trench.
"Here's Major Hilton, sir." A lean young man with a thin aquiline nose
and a face of Indian red approached them, stepping like a cat along
the trench.
"Mr. Grant," he said.
May Margaret nodded, and they were about to shake hands, when
one side of the trench seemed to rise up and smash against their
faces, with a roar that stunned them. May Margaret picked herself
up at once, wiping the bits of grit out of her eyes. The bombardment
appeared to be growing in intensity.
"That was pretty near," said Major Hilton. "You'd better come into
my dugout till this blows over."
He led the way into his gloomy little cavern. It was not much of a
shelter from a direct hit; but it would protect them from flying
splinters at least.
"Mr. Davidson was my friend," said May Margaret at once. "I know
his people. I think there must be some mistake about ... about the
grave."
"You're not a relative of his, are you?" said Major Hilton. "Had you
known him for long?"
"No. Less than a year."
"Well, I don't mind telling you that there was a mistake. We
discovered it a few hours after it was made; but we thought it better
not to upset his people by giving them further details."
"He was killed, then," May Margaret whispered; and, if the darkness
of the dugout had not veiled her face, Major Hilton would not have
continued.
"Yes. It was a trench raid. The Boches took a section of our
trenches. When we recovered it, we found him. You'd better not tell
his people, but I don't mind telling you. It was a pretty bad case."
"What do you mean?"
"One of those filthy Boche tricks. They'd nailed him up against the
lining of the trench with bayonets. He was still alive when we found
him. But they'll get it all back. We're going to give 'em hell to-night."
May Margaret was silent for so long that Major Hilton peered at her
more closely. Her white face looked like a bruised thing in the
darkness.
"I'm sorry," he said. "Perhaps I shouldn't have told you. They have
done so much of that kind of thing, I suppose we've got used to it.
Well, you've been tramping about all day, and if I were you, as
you're going to spend the night here, I should settle down for a bit
in the dugout. The bombardment seems to be easing off a little, and
you'll want to be awake all night. There'll be some sights coming on
of the picturesque kind—fireworks and things, which is what you
want, I suppose, for the blessed old public."
Far away, in another section of the trenches, there was a burst of
cheering. Major Hilton pricked up his ears to listen; but it was
drowned immediately in another blast outside that sealed the mouth
of the dugout like a blow from a gigantic hammer and plunged them
into complete darkness thick with dust and sand.
"Are you all right?" said Hilton, in a moment or two. "They've blown
the parapet over us. Our chaps will soon get us out."
They sat down and waited. The sound of their rescuers' shovels was
followed almost immediately by the pulling away of a sandbag, and
the dusty daylight filtered in again, bringing with it another roar of
cheering, nearer now, and rolling along the trenches like an Atlantic
breaker.
"What the hell are they shouting about?" Hilton grunted, as he
scrambled through the opening. May Margaret was about to follow
him, when the abrupt answer struck her motionless.
"America has declared war, sir."
"Are you sure?"
"Yes, sir. They are passing the President's message along the line. It
looks as if they mean business."
May Margaret had moved further back into the darkness of the
dugout. She was breathing quickly, panting like a thirsty dog. She
dropped on her knees by an old packing-case in the corner.
"Thank God. Thank God," she repeated, with her eyes shut. Then
the tears came, and her whole body shook.
A hand touched her shoulder. She rose to her feet and saw the
bewildered face of Major Hilton, peering again at her own.
"I'm sorry," she said. "It's the first time I've done it since I was a kid;
but I've been hoping for this ever since the beginning. It's my
country, you see."
"I've just been looking at the President's message," said Hilton. "I'm
an Englishman, but—if a democracy can discipline itself—I'm not
sure that yours won't be the greatest country in the world. I suppose
it must be, or the Lord wouldn't have entrusted so much to you. He
gave you the best that we ever had to give, and that was our
Englishman, George Washington; and the best thing that George
Washington ever did, was to fight the German King and his twenty
thousand Hessians. Eh, what?"
It was a little after dusk when the unexpected happened. There had
been a lull in the bombardment; and, on Major Hilton's advice, May
Margaret was resting in the dugout in readiness for the long wakeful
night of the trenches.
She lay there, dazed as from shell-shock by the account of Brian's
death; and the declaration of war from her own country had burst
upon her with an equal violence, leaving her stunned in a kind of
"No Man's Land," a desolate hell, somewhere between despair and
triumph. Her world had broken up. Her mind was no longer her own.
Her thoughts were helpless things between enormous conflicting
forces; and, as if to escape from their rending clutches, as if to cling
to the present reality, she whispered to herself the words of the
wounded soldier at Charing Cross station: "If you meet him, give
him hell for me! Give him hell for me." It seemed as if it were Brian
himself speaking. Once, with a swift sense of horror, catching herself
upon the verge of insanity, she found that her imagination was
furtively beginning to picture his last agony, and she stopped it,
screwing her face up, like a child pulling faces at a nightmare, and
making inarticulate sounds to drive it away.
Of one thing she was quite certain now. She did not wish to live any
longer in a world where these things were done. She meant, by
hook or by crook, to get to the dangerous bit of the trench, where
our men were only separated by six yards from the enemy, and to
stay there until she was killed. Even if she couldn't throw bombs
herself, she supposed that she could hand them up to others. And
any thought that conflicted with this idea she suppressed,
automatically, with her monotonous echo of the wounded soldier,
"Give them hell for me."
But she was spared any further trouble about the execution of her
plans; and she knew, at once, that she had come to the end of her
quest, when she heard the quick sharp cries of warning outside.
It was a trench-raid, brief, and unimportant from a military point of
view. The newspapers told London, on the next day, that nothing of
importance had happened. Half a dozen revolvers cracked. There
were curses and groans, a sound of soft thudding blows and
grunting, gasping men, followed by a loud pig-like squeal. Then May
Margaret saw three faces peering cautiously into the dugout, faces
of that strange brutality, heavy-boned, pig-eyed, evil-skulled, which
has impressed itself upon the whole world as a distinct reversion
from all civilized types of humanity. She knew them, as one
recognizes the smell of carrion; and her whole soul exulted as she
seized her supreme chance of striking at the evil thing. She had
picked up a revolver almost unconsciously, and without pausing to
think she fired three times with a steady hand. Two of them she
knew that she had killed. The third had been too quick for her, and
in another second she was down on her back, with a blood-greased
boot on her throat, and a throng of evil-smelling cattle around her.
Unhappily, they did not kill her at once; and so the discovery was
made, amidst a storm of guttural exclamations.
When the trench was retaken, half an hour later, a further discovery
was made by Major Hilton. A locket containing a photograph of Brian
Davidson was buried in what remained of her left breast, as if it had
been trying to hide in her heart. It was almost the only thing about
her that was unhurt.
Major Hilton made no explanations; but when the body was
removed, he gave strict orders for it to be buried by the side of
Lieutenant Davidson.

A week later, Mr. Harvey, of the Chicago Bulletin, was informed that
his correspondent, Mr. Martin Grant, had died of pneumonia. The
authorities left the responsibility of informing others, who might be
interested, to his capable hands.
He went to see Julian Sinclair about it; but he could not discover
whether that sincerely regretful young diplomat with the dazzling
smile and the delightful manners knew anything more. It may have
been a coincidence that, shortly afterwards, Mr. Harvey was recalled
to the shores of Lake Michigan, and replaced by another manager.
IX
MAROONED

I
Rachel Hepburn believed that her first lover had been drawn to her—
when she was twenty-two years old—by the way in which she played
the violin. She played it remarkably well; and she was also
exceedingly pretty, in a frank open-air fashion. Until she was
seventeen, she had lived on the mountainous coast of Cumberland,
where she rode astride, and swam half a mile every morning before
breakfast. Her family nicknamed her "the Shetland Pony"; and that
was her picture to the life, as she used to come in from her swim,
with her face glowing and her dark eyes like mountain pools, and
the thick mane of hair blowing about her broad forehead. Her sturdy
build helped the picture at the time; but she had shot up in height
since then, and the phrase was no longer applicable. At twenty-four,
she became beautiful, and her music began to show traces of
genius. Unfortunately, she had the additional attraction of ten
thousand pounds a year in her own right; and, when the marriage
settlement was discussed, she proposed to share the money with
her three younger sisters.
The young man behaved very badly. She told him—very quietly—that
this was the result of her own folly; for, in her family, hitherto,
marriages had always been "arranged." He replied—for he was an
intellectual young man, who understood women, and read the most
advanced novelists—that she was one of those who were ruining
England with their feudal ideas. Then they parted, the young man
cursing under his breath, and Rachel lilting the ballad to which she
had hitherto attributed her good fortune.
"Maxwelton's braes are bonnie, where early fa's the dew,
And it's there that Annie Laurie gi'ed me her promise true,
Gi'ed me her promise true, which ne'er forgot shall be,
And for bonnie Annie Laurie, I'd lay me doon and dee."

He had quoted it so often in his letters that she was justified,


perhaps, in thinking that it had influenced her fate. "You know,
darling, that those words were supposed to tell the love of a soldier,
who died in Flanders, fighting for England, more than a hundred
years ago, and when you sing them, I feel that I, too ..." So it was
the obvious thing to toss at him as she went through the door,
holding her head up almost as gallantly as a soldier. But he didn't
seem to mind, and the parting was final.
Rachel, apparently, minded very much indeed; but she kept it to
herself and her violin, till on a certain day, she decided that she must
escape from all her old surroundings and forget.
Her guardian was the only person she consulted, and he made no
criticism of her scheme of travel so far as she divulged it. She had
been brought up to complete freedom, while her parents were alive,
and in the six years since their death, she had proved that she was
capable of taking care of herself. He was wise or unwise enough not
to let her know that he understood her trouble. But he tried to
express a certain sympathy in his gruff parting words, "London is a
grimy cavern."
"Yes, and the people are grimy, too," she replied, waving her hand
to him, as she went out into the fog. She looked brighter than she
had looked for months past. His last impression of her was that she
looked as roses would look if they could wear furs and carry stars in
their eyes.
She had been studying the sailings of the ocean-steamers for some
time, but it was not her intention to follow the traveled routes more
than was necessary. Her brain was busy with a new music, the music
of the names in a hundred tales that she had read. The Golden Gate
and Rio Grande called to her like chords in a Beethoven symphony.
Yokohama and Singapore stirred her like Rossini. But it was the folk-
song of travel that she wanted, something wilder and sweeter even
than Tahiti, some fortunate Eden island in the South Seas.
Egypt and Ceylon were only incidents on her way. They only set the
fever burning a little more restlessly in her veins; and her first
moment of content was when the yacht of thirty tons, which she
chartered in San Diego, carried her out to the long heave of the
Pacific, and turned southward on the endless trail to the Happy
Islands.
This was a part of her scheme about which she had not consulted
any one at home, or she might have received some good advice
about the choice of her ship. It was a sturdy little craft, with small
but excellent cabins for herself and her maid. The captain and his
wife were apparently created for her special benefit, being very
capable people, with the quality of effacing themselves. The crew, of
half a dozen Kanakas in white shirts and red pareos, was picturesque
and remote enough from all the associations of cities to satisfy her
desire for isolation.
The maid was the only mistake, she thought, and she did not
discover this until they had been a fortnight at sea. Her own maid
had fallen ill at an early stage of her travels, and had been sent
home from Cairo. Rachel had engaged this new one in San Diego,
chiefly because she thought it necessary to take somebody with her.
When Marie Mendoza had come to do Rachel's hair at San Diego,
she had a somewhat pathetic story to tell about a husband who had
deserted her and forced her to work for her living. Rachel thought
there might be two sides to the story when she discovered that the
captain was playing the part of Samson to this Delilah. It was a vivid
moonlight picture that she saw in the bows one night, when she had
come up on deck unexpectedly for a breath of air. Captain Ryan was
an ardent wooer, and he did not see her. Marie Mendoza looked
rather like a rainbow in the arms of a black-bearded gorilla, and
Rachel retired discreetly, hoping that it was merely a temporary
aberration.
She would have been more disturbed, probably, if she had heard a
little of the conversation of this precious pair.
"I tell you, it's a cinch, Mickey. I never seen pearls like 'em. They're
worth fifty thousand dollars in Tiffany's, if they're worth a cent. She
keeps 'em locked up in her steamer-trunk, but I seen her take 'em
out several times."
"Well, I've been hunting pearls up and down the South Seas for
twenty years, and never had a chance of making good like this."
But Rachel did not hear the conversation, or she might have been
able to change the course of events considerably. She might even
have taken an opportunity of explaining to Marie that the real pearls
were in the bank at home, and that the necklace in her trunk was a
clever imitation, useful when she wished to adorn herself without
too much responsibility, and worth about thirty-five pounds in
London, or perhaps a little more than one hundred and fifty dollars
in New York.
But Rachel knew nothing of all this; and so, on a certain morning,
when the Seamew dropped anchor off the coral island of her
dreams, she went ashore without any misgivings. It was an island
paradise, not recognized by any map that she had seen, though
Captain Ryan seemed to know all about it. Rachel had particularly
wanted to hear the real music of the islanders, and Captain Ryan
had assured her that she would find it at its best among the
inhabitants of this island, who had been unspoiled by travelers, and
yet were among the most gentle of the natives of the South Seas.
Marie Mendoza pleaded a headache, and remained on board; but
the Captain and his wife accompanied Rachel up the white beach,
leaving the boat in charge of the Kanakas. A throng of brown-
skinned, flower-wreathed islanders watched them timidly from under
the first fringe of palm trees; but the Captain knew how to ingratiate
himself; and, after certain gifts had been proffered to the bolder
natives, the rest came forward with their own gifts of flowers and
long stems of yellow fruit. Two young goddesses seized Rachel by
the hands, and examined her clothes, while the rest danced round
her like the figures from the Hymn to Pan in "Endymion."
Before the morning was over, Rachel had made firm friends of these
two maidens, who rejoiced in the names of Tinovao and Amaru;
and, when she signified to them that she wanted to swim in the
lagoon, they danced off with her in an ecstasy of mirth at the
European bathing dress which she carried over her arm, to their own
favorite bathing beach, which was hidden from the landing-place by
a palm-tufted promontory.
It was more than an hour later when she returned, radiant, with her
radiant companions. She was a superb swimmer, and she had lost all
her troubles for the time in that rainbow-colored revel. She thought
of telling the Captain that they would stay here for some days. She
wanted to drink in the beauty of the island, and make it her own; to
swim in the lagoon, and bask in the healing sun; to walk through the
palms at dusk, and listen to the songs of the islanders. But where
was the Captain? Surely, this was the landing-place. There were the
foot-prints and the mark of the boat on the beach. Then she saw—
with a quick contraction of the heart—not only that the boat was
missing, but that there was no sign of the yacht. She stared at the
vacant circle of the sea, and could find no trace of it. There was no
speck on that blazing sapphire.

II
Her last doubt as to whether she had been deliberately marooned
was removed by Tinovao, who pointed to a heap of her belongings
that had been dumped on the beach, all in accordance with the best
sea-traditions, though it was due in this case to a sentimental spasm
on the part of Marie Mendoza, who remembered the kindness of
Rachel at San Diego.
The heap was a small one. But Rachel was glad to see that it
included her violin-case.
She knew that her stay was like to be a long one. They had been
looking for islands out of the way of ships; and she knew that it
might even be some years before another sail appeared on that
stainless horizon. The thieves would disappear, and they were not
likely to talk. Her own movements had been so erratic that she
doubted whether her friends could trace her. But she took it all very
pluckily; so that the round-eyed Amaru and Tinovao were unable to
guess the full meaning of her plight. They came to the conclusion,
and Rachel thought it best to encourage them in it, that she was
voluntarily planning to live amongst them for a little while, and that
the yacht would of course return for her. They had heard of white
people doing these strange things, and they were delighted at the
prospect.
In a very short time, they had lodged Rachel in a hut of palm leaves,
with all the fruits of the island at her door. They carried up the small
heap of her possessions, and she gave them each a little mirror from
her dressing bag, which lifted them into the seventh heaven.
Thenceforward, they were her devoted slaves. Rachel discovered,
moreover, while they were turning over her possessions and
examining her clothes, that her ignorance of their language was but
a slight barrier to understanding. They communicated, it seemed, by
a kind of wireless telegraphy, through that universal atmosphere of
their sex. They helped her to do her hair; and, as it fell over her
shoulders, they held it up to one another, admiring its weight and
beauty. When it was dark, there came a sound of singing from the
beach; and they crowned her with fresh frangipanni blossoms, and
led her out like a bride, to hear the songs of the islanders.
It was a night of music. In the moonlight, on the moon-white sands,
a few of the younger islanders, garlanded like the sunburnt lovers of
Theocritus, danced from time to time; but, for the most part, they
were in a restful mood, attuned to the calm breathing of the sea.
Their plaintive songs and choruses rose and fell as quietly as the
night-wind among the palms; and Rachel thought she had never
heard or seen anything more exquisite. The beauty of the night was
deepened a thousand-fold by her new loneliness. The music plucked
at her heart-strings. Beautiful shapes passed her, that made her
think of Keats:

"Now more than ever seems it rich to die,


To cease upon the midnight with no pain."

She murmured the lines to herself; and while her lips yet moved, a
young islander stood before her who might have posed as the model
for Endymion. He was hardly darker than herself, and, to her
surprise, he spoke to her in quaint broken English.
"Make us the music of your own country," was what she understood
him to say, and Tinovao confirmed it by darting off to the hut and
returning with the violin. Rachel took it, and without any conscious
choice of a melody, began to play and sing the air which had been
pulsing just below the level of her consciousness ever since she had
left England:

"Like dew on the gowan lying is the fa' of her fairy feet,
And like winds in simmer sighing, her voice is low and sweet,
Her voice is low and sweet, and she's a' the world to me,
And for bonnie Annie Laurie, I'd lay me doon and dee."

The islanders listened, as if spellbound; but she could not tell


whether the music went home to any of them, except the boy who
lay at her feet with his eyes fixed on her face. When the last notes
died away, the crowd broke into applause, with cries of "Malo!
Malo!" But the boy lay still, looking at her, as a dog looks at his
mistress. Then the moonlight glistened in his eyes, and she thought
that she saw tears. She bent forward a little to make sure. He rose
with a smile, and lifted her hand to his face, so that she might feel
that his eyes were wet.
"Tears," he said, "and I only listen. But you—you make the music,
and no tears are in your eyes." He looked into her face.
"No," she said, "there are no tears in my eyes." Then she continued
hurriedly, as if speaking to herself (and perhaps only a musician
would have felt that the catch in her voice went a little deeper than
tears): "That's one of the things you lose when you go in for music.
It used to be so with me, too."
"I like your music," the boy went on. "My father—English sailor. My
mother—learn speak English—from him. She teach me. My father
only stay here little time. I never see English people before this."
Rachel looked at him with a quick realization of what his words
meant. The boy was at least eighteen years old.
"You remember no ship coming to this island?" she said.
"No. I never see my father. He only stay here little time. My mother
think for long time he will come again. That is how she die, only a
little time ago. Too much waiting. Make some more music. You have
made my ears hungry."
But Rachel was facing the truth now, and she played and sang no
more that night.

III
For a week or two, Rachel spent much time alone, thinking hard,
thinking things out as she had never done before. She did not quite
understand her isolation till the first shock of the full discovery had
passed. Then, one morning, sitting alone, and gazing out over the
spotless blue, she found herself accepting the plain fact, that this
might indeed be for ever. She found herself weighing all the
chances, all that she had lost, and all that yet remained to her. It
dawned upon her, for the first time, that youth does not lightly
surrender the fulness of its life, at the first disillusionment. She knew
now that she would have recovered from that first disastrous love-
affair. She knew now that she had always known it, and that her
search had been only for some healing dittany, some herb of grace
that would heal her wound more quickly. She faced it all—the loss of
her birthright as a woman, the loss of the unknown lover. She saw
herself growing old in this loneliness.
She weighed everything that was left to her, the freedom from all
the complications of life, the beauty of her prison, the years of youth
and strength that might yet rejoice in the sun and the sea, and even
find some companionship among these children of nature that
rejoiced in them also. She compared them with the diseased
monstrosities, the hideous bodies and brutal faces that swarmed in
the gray cities of Europe. She saw nothing to alter her former
opinion here. She was condemned at any rate to live among a folk
that had walked out of an ode by Keats. But always, at the end, she
pictured herself growing old, with her own life unfulfilled.
Then, one day, a change came over her. She had lost all count of
time in that island of lasting summer; but she must have been
marooned for many months when it happened.
One afternoon, when she had been swimming with Tinovao and
Amaru, the two girls had run up into the woods to get some fruit,
leaving Rachel to bask on the beach alone. The sunlight of the last
few months had tinted her skin with a smooth rosy brown that
would have made it difficult to distinguish her from a native, except
for the contours of her face and the deep violet of her eyes, as she
lay on that milk-white sand. Before she followed her friends, she
thought she would take one more ride through the surf. She made
her way out, through the gap in the reef, till she had reached the
right distance. Then she rested, treading water, while she waited for
the big comber that was to carry her back again.
It was her civilized intelligence, perhaps, that betrayed her now, for
she turned her back to the sea for a moment, while she drank in the
beauty of the feathery green palms and delicate tresses of the
ironwood that waved along the shore. She was roused from her
dreams by the familiar muffled roar of the approaching breaker, and
she turned her head a few seconds too late to take the rush of it as
it ought to have been taken. It was a giant and, for almost the first
time in her life, she knew the sensation of fear in the sea, as the
green crest crumbled into white high over her. In that instant, too,
she caught a glimpse of a figure on the reef watching her. It was the
figure of Rua, the boy who spoke English; and, as the breaker
crashed down with all its tons of water over her head, she carried
with her the impression that he was about to dive to her rescue. She
was whirled helplessly, heels over head, downward and downward,
then swept forward with the rushing whirlpools in the blackness
below, like a reed in a subterranean river. She knew that if she could
hold her breath long enough, she would rise to the surface; but she
had reckoned without the perils of the gap in the reef. Twice she was
whirled and caught against a jagged piece of coral, which would
probably have killed her if it had struck her head. She took the
warning, and held her arms in the best way she could to ward off
any head-blow. A lacerated body would not matter so much as the
momentary stunning that might prevent her from keeping afloat
when she rose. At last, when it seemed that she could hold her
breath no longer, she shot with a wild gasp to the surface again.
She found that she was only half-way through the gap, not in mid-
stream where she would have been comparatively safe, but in an
eddy of boiling water, close to the reef and among sharp fangs of
coral that made it impossible to swim. All that she could do, at the
moment, was to hold on to the coral and prevent herself from being
lacerated against it. The sharp edges of the little shells, with which it
was covered here, cut her hands, as the water swirled her to and
fro; but she held on, and looked round for help.
Then she saw that she was not fated to receive help, but to give it;
and, like lightning in a tropic night, the moment changed her world.
She had no time to think it out now; for she saw the face of Rua,
swirling up towards her through the green water, and it looked like
the face of a drowned man. His head and arms emerged, and sank
again, twice, before she caught him by the hand and drew him, with
the strength of a woman fighting for life, to her side.
She was not sure whether he was alive or dead; but she saw that, in
his hasty plunge to help her, a dive that no native would have taken
at that place in ordinary circumstances, he had struck one of the
coral jags. Blood was flowing from his head and, as she held him
floating there helplessly for a minute, the clear water went away
over the white coral tinted with little clouds of crimson. She waited
for the next big wave, thinking that it would save or destroy them
both. Happily, it had not broken when it reached them; and, as they
rose on the smooth back of it, she held her companion by the hand,
and struck out fiercely for a higher shelf of the reef. It had been out
of her reach before; but the wave carried them both up to its level,
and left them stranded there.
From this point, the reef rose by easy stages; and, with the aid of
two more waves, she was able to lug Rua to a point where there
was no risk of their being washed away, though the clear water still
swirled up about them, and went away clouded with red. She lay
there for a moment exhausted; but, as her strength came back to
her, the strange sensation that flashed through her when she had
first come to the surface returned with greater force. Much has been
said and sung about the dawn of wonder on the primitive mind. This
was an even stranger dawn, the dawn of wonder on a daughter of
the twentieth century. It seemed to her that she was looking at the
world for the first time, while she lay there panting and gazing out to
sea, with those red stains on the white coral, and her hands gripping
the slender brown hands of the half-drowned islander. It seemed
that she had returned to her childhood, and that she was looking at
a primal world that she had forgotten. She saw now that Rua was
breathing, and she knew instinctively that he would recover. The
wave of joy that went through her had something primitive and
fierce in it, like the joy of the wild creatures. She felt like an islander
herself, and when the sea-birds hovered overhead, she called to
them, in the island tongue, and felt as if she had somehow drawn
nearer to them. She looked at the sea with new eyes, as if it were a
fierce old play-mate of her own, an old tiger that had forgotten to
sheath its claws when it buffeted its cubs. There was a glory in the
savor of life, like the taste of freedom to a caged bird. Only it was
Europe now, and the world of houses, that seemed the cage. The
sea had never been so blue. The brine on her lips was like the
sacramental wine of her new kinship with the world....
Then, looking at Rua's face, as the life came back to it, a wave of
compassion went through her. Every contour of that face told her
that this boy also was a victim of her own kindred. He, too, was
marooned, and more hopelessly than herself, for there must be a
soul within him that could never even know what it had lost or what
it hungered for, unless, ... unless, perhaps, she could help him out of
the treasures of her own memory, and give him glimpses of that
imperial palace whence he came.
It was growing dark when they slipped into the water of the lagoon
and swam slowly towards the beach. There, she helped him to limp
as far as his hut, neither of them speaking. He dropped on his
knees, as she turned to go, and laid his face at her feet. She stayed
for a moment, looking at him, and half stooped to raise him; but she
checked the impulse, and left him abruptly.
At the edge of the wood, she turned to look again, and he was there
still, in the same attitude. There was a dumb pathos in it that
reminded her curiously of certain pictures of her lost world, the
peasants in the Angelus of Millet, though this was a picture
unmarred by the curse of Adam, the picture of a dumb brown
youthful god, perfect in physical beauty, praying in Paradise garden
to the star that trembled above the palms.
Many women (and most men) in their unguarded moments, impute
their own good and evil to others; read their own thoughts in the
eyes around them; pity their own tears, or the tears of Vergil, in the
eyes of "Geist." But Rua was praying to the best he knew.
IV
The prayer was a long one. It lasted, in various forms, for more than
a year. At dawn, she would wake, and find offerings of fruit and
flowers left at her door by her faithful worshiper; and often she
would talk with him on the beach, telling him of her own country,
about which he daily thirsted to hear more; for the more he learned,
the more he seemed to share her own exile. Music, too, they shared,
that universal language whose very spirituality is its chief peril; for it
is emotion unattached to facts, and it may mean different things to
different people; so that you may accompany the sacking of cities by
the thunders of Wagner, or dream that you see angels in an empty
shrine. Sometimes, in the evening, Rua would steal like a shadow
from the shadows around her hut, where he had been waiting to see
her pass, and would beg her to play the music of her own country.
Then she would sing, and he would stand in the doorway listening,
with every pulse of his body beating time, and one brown foot
tapping in the dust.
One night, she had been wandering with Tinovao and Amaru by the
lagoon, in which the reflected stars burned so brightly that one
might easily believe the island hung in mid-heaven. She looked at
them for a long time; then, with her arms round the two girls, who
understood her words only vaguely, she murmured to herself: "What
does it matter? What does anything matter when one looks up
there? And life is going ... life and youth."
She said good-night to her friends, and laughingly plucked the red
hibiscus flower from behind the shell-like ear of Tinovao as they
parted. When she neared her door, a shadow stole out of the woods,
and stood before her on the threshold. His eyes were shining like
dark stars, the eyes of a fawn. "Music," he pleaded, "the music of
your country."
Then he saw the red flower that she wore behind her ear, exactly as
Tinovao had worn it. He stared at her, as Endymion must have
stared at Diana among the poppies of Latmos, half frightened, half
amazed. He dropped to his knees, as on that night when she had
saved him. He pressed his face against her bare feet. They were
cold and salt from the sea. But she stooped now, and raised him.
"In my country, in our country," she said, "love crowns a man.
Happy is the love that does not bring the woman to the dust."

There followed a time when she was happy, or thought herself


happy. It must have lasted for nearly seven years, the lifetime of
that dancing ray of sunlight, the small son, whom she buried with
her own hands under a palm-tree. Then Rua deserted her, almost as
a child forsakes its mother. He was so much younger than herself,
and he took a younger wife from among the islanders. When she
first discovered his intention, Rachel laughed mockingly at herself,
and said—also to herself, for she knew that she had somehow lost
the power to make Rua understand her,—"Have you, too, become an
advanced thinker, Rua?"
But Rua understood that it was some kind of mockery; and, as her
mockery was keeping him away from his new fancy, and he was an
undisciplined child, he leapt at her in fury, seized her by the throat,
and beat her face against the ground. When she rose to her feet,
with the blood running from her mouth, he saw that he had broken
out two of her teeth. This effectively wrecked her beauty, and
convinced him, as clearly as if he had indeed been an advanced
thinker, that love must be free to develop its own life, and that, in
the interests of his own soul, he must get away as quickly as
possible. Thereafter, he avoided her carefully, and she led a life of
complete solitude, spending all her days by the little grave under the
palm-tree.
She lost all count of time. She only knew that the colors were fading
from things, and that while she used to be able to watch the waves
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like