100% found this document useful (12 votes)
76 views

Instant Download Building iPhone Apps with HTML CSS and JavaScript Making App Store Apps Without Objective C or Cocoa 1st Edition Jonathan Stark PDF All Chapters

iPhone

Uploaded by

takaisilonhl
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (12 votes)
76 views

Instant Download Building iPhone Apps with HTML CSS and JavaScript Making App Store Apps Without Objective C or Cocoa 1st Edition Jonathan Stark PDF All Chapters

iPhone

Uploaded by

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

Download the full version of the ebook at ebookname.

com

Building iPhone Apps with HTML CSS and JavaScript


Making App Store Apps Without Objective C or Cocoa
1st Edition Jonathan Stark

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/

OR CLICK BUTTON

DOWNLOAD EBOOK

Download more ebook instantly today 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/

ebookname.com

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/
ebookname.com

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/

ebookname.com

Get It Set It Move It Prove It 60 Ways To Get Real Results


In Your Organization 1st Edition Mark Graham Brown

https://ebookname.com/product/get-it-set-it-move-it-prove-it-60-ways-
to-get-real-results-in-your-organization-1st-edition-mark-graham-
brown/
ebookname.com
Schaum s Outline of Electric Circuts 4th Edition
Edminister

https://ebookname.com/product/schaum-s-outline-of-electric-
circuts-4th-edition-edminister/

ebookname.com

The Heston Model and Its Extensions in VBA 1st Edition


Fabrice D. Rouah

https://ebookname.com/product/the-heston-model-and-its-extensions-in-
vba-1st-edition-fabrice-d-rouah/

ebookname.com

Advances in Applied Microbiology 60 1st Edition Allen I.


Laskin

https://ebookname.com/product/advances-in-applied-microbiology-60-1st-
edition-allen-i-laskin/

ebookname.com

Advances in Decision Analysis From Foundations to


Applications 1st Edition Ward Edwards

https://ebookname.com/product/advances-in-decision-analysis-from-
foundations-to-applications-1st-edition-ward-edwards/

ebookname.com

Hell of a Vision Regionalism and the Modern American West


1st Edition Robert L. Dorman

https://ebookname.com/product/hell-of-a-vision-regionalism-and-the-
modern-american-west-1st-edition-robert-l-dorman/

ebookname.com
Drug Courts In Theory and in Practice 1st Edition James L.
Nolan Jr. (Ed.)

https://ebookname.com/product/drug-courts-in-theory-and-in-
practice-1st-edition-james-l-nolan-jr-ed/

ebookname.com
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 corporate@oreilly.com.

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 permissions@oreilly.com.

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:
bookquestions@oreilly.com
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


Random documents with unrelated
content Scribd suggests to you:
beneficence sometimes makes the one bright spot in lives that have
suffered of all wrongs the most cruel,—that of being despoiled of
their childhood. Sometimes they are little Bohemians; sometimes the
children of refugee Jews; and again, Italians, or the descendants of
the Irish stock of Hell's Kitchen and Poverty Row; always the
poorest, the shabbiest, the hungriest—the children Santa Claus loves
best to find, if any one will show him the way. Having so much on
hand, he has no time, you see, to look them up himself. That must
be done for him; and it is done. To the teacher in the Sullivan Street
school came one little girl, this last Christmas, with anxious inquiry if
it was true that he came around with toys.
"I hanged my stocking last time," she said, "and he didn't come at
all." In the front house indeed, he left a drum and a doll, but no
message from him reached the rear house in the alley. "Maybe he
couldn't find it," she said soberly. Did the teacher think he would
come if she wrote to him? She had learned to write.
Together they composed a note to Santa Claus, speaking for a doll
and a bell—the bell to play "go to school" with when she was kept
home minding the baby. Lest he should by any chance miss the alley
in spite of directions, little Rosa was invited to hang her stocking,
and her sister's, with the janitor's children's in the school. And lo! on
Christmas morning there was a gorgeous doll, and a bell that was a
whole curriculum in itself, as good as a year's schooling any day!
Faith in Santa Claus is established in that Thompson Street alley for
this generation at least; and Santa Claus, got by hook or by crook
into an Eighth Ward alley, is as good as the whole Supreme Court
bench, with the Court of Appeals thrown in, for backing the Board of
Health against the slum.
But the ice-cream! They eat it off the seats, half of them kneeling or
squatting on the floor; they blow on it, and put it in their pockets to
carry home to baby. Two little shavers discovered to be feeding each
other, each watching the smack develop on the other's lips as the
acme of his own bliss, are "cousins"; that is why. Of cake there is a
double supply. It is a dozen years since "Fighting Mary," the wildest
child in the Seventh Avenue school, taught them a lesson there
which they have never forgotten. She was perfectly untamable,
fighting everybody in school, the despair of her teacher, till on
Thanksgiving, reluctantly included in the general amnesty and
mince-pie, she was caught cramming the pie into her pocket, after
eyeing it with a look of pure ecstasy, but refusing to touch it. "For
mother" was her explanation, delivered with a defiant look before
which the class quailed. It is recorded, but not in the minutes, that
the board of managers wept over Fighting Mary, who, all
unconscious of having caused such an astonishing "break," was at
that moment engaged in maintaining her prestige and reputation by
fighting the gang in the next block. The minutes contain merely a
formal resolution to the effect that occasions of mince-pie shall carry
double rations thenceforth. And the rule has been kept—not only in
Seventh Avenue, but in every industrial school—since. Fighting Mary
won the biggest fight of her troubled life that day, without striking a
blow.
It was in the Seventh Avenue school last Christmas that I offered the
truant class a four-bladed penknife as a prize for whittling out the
truest Maltese cross. It was a class of black sheep, and it was the
blackest sheep of the flock that won the prize. "That awful
Savarese," said the principal in despair. I thought of Fighting Mary,
and bade her take heart. I regret to say that within a week the
hapless Savarese was black-listed for banking up the school door
with snow, so that not even the janitor could get out and at him.
Within hail of the Sullivan Street school camps a scattered little
band, the Christmas customs of which I had been trying for years to
surprise. They are Indians, a handful of Mohawks and Iroquois,
whom some ill wind has blown down from their Canadian
reservation, and left in these West Side tenements to eke out such a
living as they can, weaving mats and baskets, and threading glass
pearls on slippers and pin-cushions, until, one after another, they
have died off and gone to happier hunting-grounds than Thompson
Street. There were as many families as one could count on the
fingers of both hands when I first came upon them, at the death of
old Tamenund, the basket maker. Last Christmas there were seven. I
had about made up my mind that the only real Americans in New
York did not keep the holiday at all, when, one Christmas eve, they
showed me how. Just as dark was setting in, old Mrs. Benoit came
from her Hudson Street attic—where she was known among the
neighbors, as old and poor as she, as Mrs. Ben Wah, and was
believed to be the relict of a warrior of the name of Benjamin Wah—
to the office of the Charity Organization Society, with a bundle for a
friend who had helped her over a rough spot—the rent, I suppose.
The bundle was done up elaborately in blue cheese-cloth, and
contained a lot of little garments which she had made out of the
remnants of blankets and cloth of her own from a younger and
better day. "For those," she said, in her French patois, "who are
poorer than myself;" and hobbled away. I found out, a few days
later, when I took her picture weaving mats in her attic room, that
she had scarcely food in the house that Christmas day and not the
car fare to take her to church! Walking was bad, and her old limbs
were stiff. She sat by the window through the winter evening, and
watched the sun go down behind the western hills, comforted by her
pipe. Mrs. Ben Wah, to give her her local name, is not really an
Indian; but her husband was one, and she lived all her life with the
tribe till she came here. She is a philosopher in her own quaint way.
"It is no disgrace to be poor," said she to me, regarding her empty
tobacco-pouch; "but it is sometimes a great inconvenience." Not
even the recollection of the vote of censure that was passed upon
me once by the ladies of the Charitable Ten for surreptitiously
supplying an aged couple, the special object of their charity, with
army plug, could have deterred me from taking the hint.
Very likely, my old friend Miss Sherman, in her Broome Street cellar,
—it is always the attic or the cellar,—would object to Mrs. Ben Wah's
claim to being the only real American in my note-book. She is from
Down East, and says "stun" for stone. In her youth she was lady's-
maid to a general's wife, the recollection of which military career
equally condones the cellar and prevents her holding any sort of
communication with her common neighbors, who add to the offence
of being foreigners the unpardonable one of being mostly men. Eight
cats bear her steady company, and keep alive her starved affections.
I found them on last Christmas eve behind barricaded doors; for the
cold that had locked the water-pipes had brought the neighbors
down to the cellar, where Miss Sherman's cunning had kept them
from freezing. Their tin pans and buckets were even then banging
against her door. "They're a miserable lot," said the old maid,
fondling her cats defiantly; "but let 'em. It's Christmas. Ah!" she
added, as one of the eight stood up in her lap and rubbed its cheek
against hers, "they're innocent. It isn't poor little animals that does
the harm. It's men and women that does it to each other." I don't
know whether it was just philosophy, like Mrs. Ben Wah's, or a
glimpse of her story. If she had one, she kept it for her cats.
In a hundred places all over the city, when Christmas comes, as
many open-air fairs spring suddenly into life. A kind of Gentile Feast
of Tabernacles possesses the tenement districts especially. Green-
embowered booths stand in rows at the curb, and the voice of the
tin trumpet is heard in the land. The common source of all the show
is down by the North River, in the district known as "the Farm."
Down there Santa Claus establishes headquarters early in December
and until past New Year. The broad quay looks then more like a
clearing in a pine forest than a busy section of the metropolis. The
steamers discharge their loads of fir trees at the piers until they
stand stacked mountain-high, with foot-hills of holly and ground-ivy
trailing off toward the land side. An army train of wagons is engaged
in carting them away from early morning till late at night; but the
green forest grows, in spite of it all, until in places it shuts the
shipping out of sight altogether. The air is redolent with the smell of
balsam and pine. After nightfall, when the lights are burning in the
busy market, and the homeward-bound crowds with baskets and
heavy burdens of Christmas greens jostle one another with good-
natured banter,—nobody is ever cross down here in the holiday
season,—it is good to take a stroll through the Farm, if one has a
spot in his heart faithful yet to the hills and the woods in spite of the
latter-day city. But it is when the moonlight is upon the water and
upon the dark phantom forest, when the heavy breathing of some
passing steamer is the only sound that breaks the stillness of the
night, and the watchman smokes his only pipe on the bulwark, that
the Farm has a mood and an atmosphere all its own, full of poetry
which some day a painter's brush will catch and hold.
Into the ugliest tenement street Christmas brings something of
picturesqueness, of cheer. Its message was ever to the poor and the
heavy-laden, and by them it is understood with an instinctive
yearning to do it honor. In the stiff dignity of the brown-stone streets
up-town there may be scarce a hint of it. In the homes of the poor it
blossoms on stoop and fire-escape, looks out of the front window,
and makes the unsightly barber-pole to sprout overnight like an
Aaron's-rod. Poor indeed is the home that has not its sign of peace
over the hearth, be it but a single sprig of green. A little color creeps
with it even into rabbinical Hester Street, and shows in the shop-
windows and in the children's faces. The very feather dusters in the
pedler's stock take on brighter hues for the occasion, and the big
knives in the cutler's shop gleam with a lively anticipation of the
impending goose "with fixin's"—a concession, perhaps, to the
commercial rather than the religious holiday: business comes then, if
ever. A crowd of ragamuffins camp out at a window where Santa
Claus and his wife stand in state, embodiment of the domestic ideal
that has not yet gone out of fashion in these tenements, gazing
hungrily at the announcement that "A silver present will be given to
every purchaser by a real Santa Claus.—M. Levitsky." Across the
way, in a hole in the wall, two cobblers are pegging away under an
oozy lamp that makes a yellow splurge on the inky blackness about
them, revealing to the passer-by their bearded faces, but nothing of
the environment save a single sprig of holly suspended from the
lamp. From what forgotten brake it came with a message of cheer, a
thought of wife and children across the sea waiting their summons,
God knows. The shop is their house and home. It was once the hall
of the tenement; but to save space, enough has been walled in to
make room for their bench and bed; the tenants go through the next
house. No matter if they are cramped; by and by they will have
room. By and by comes the spring, and with it the steamer. Does not
the green branch speak of spring and of hope? The policeman on
the beat hears their hammers beat a joyous tattoo past midnight, far
into Christmas morning. Who shall say its message has not reached
even them in their slum?
Where the noisy trains speed over the iron highway past the second-
story windows of Allen Street, a cellar door yawns darkly in the
shadow of one of the pillars that half block the narrow sidewalk. A
dull gleam behind the cobweb-shrouded window pane supplements
the sign over the door, in Yiddish and English: "Old Brasses." Four
crooked and mouldy steps lead to utter darkness, with no friendly
voice to guide the hapless customer. Fumbling along the dank wall,
he is left to find the door of the shop as best he can. Not a likely
place to encounter the fastidious from the Avenue! Yet ladies in furs
and silk find this door and the grim old smith within it. Now and then
an artist stumbles upon them, and exults exceedingly in his find.
Two holiday shoppers are even now haggling with the coppersmith
over the price of a pair of curiously wrought brass candlesticks. The
old man has turned from the forge, at which he was working,
unmindful of his callers roving among the dusty shelves. Standing
there, erect and sturdy, in his shiny leather apron, hammer in hand,
with the firelight upon his venerable head, strong arms bared to the
elbow, and the square paper cap pushed back from a thoughtful,
knotty brow, he stirs strange fancies. One half expects to see him
fashioning a gorget or a sword on his anvil. But his is a more
peaceful craft. Nothing more warlike is in sight than a row of brass
shields, destined for ornament, not for battle. Dark shadows chase
one another by the flickering light among copper kettles of ruddy
glow, old-fashioned samovars, and massive andirons of tarnished
brass. The bargaining goes on. Overhead the nineteenth century
speeds by with rattle and roar; in here linger the shadows of the
centuries long dead. The boy at the anvil listens open-mouthed,
clutching the bellows-rope.
In Liberty Hall a Jewish wedding is in progress. Liberty! Strange how
the word echoes through these sweaters' tenements, where
starvation is at home half the time. It is an all-consuming passion
with these people, whose spirit a thousand years of bondage have
not availed to daunt. It breaks out in strikes, when to strike is to
hunger and die. Not until I stood by a striking cloak-maker whose
last cent was gone, with not a crust in the house to feed seven
hungry mouths, yet who had voted vehemently in the meeting that
day to keep up the strike to the bitter end,—bitter indeed, nor far
distant,—and heard him at sunset recite the prayer of his fathers:
"Blessed art thou, O Lord our God, King of the world, that thou hast
redeemed us as thou didst redeem our fathers, hast delivered us
from bondage to liberty, and from servile dependence to
redemption!"—not until then did I know what of sacrifice the word
might mean, and how utterly we of another day had forgotten. But
for once shop and tenement are left behind. Whatever other days
may have in store, this is their day of play, when all may rejoice.
The bridegroom, a cloak-presser in a hired dress suit, sits alone and
ill at ease at one end of the hall, sipping whiskey with a fine air of
indifference, but glancing apprehensively toward the crowd of
women in the opposite corner that surround the bride, a pale little
shop-girl with a pleading, winsome face. From somewhere
unexpectedly appears a big man in an ill-fitting coat and skullcap,
flanked on either side by a fiddler, who scrapes away and away,
accompanying the improvisator in a plaintive minor key as he halts
before the bride and intones his lay. With many a shrug of stooping
shoulders and queer excited gesture, he drones, in the harsh,
guttural Yiddish of Hester Street, his story of life's joys and sorrows,
its struggles and victories in the land of promise. The women listen,
nodding and swaying their bodies sympathetically. He works himself
into a frenzy, in which the fiddlers vainly try to keep up with him. He
turns and digs the laggard angrily in the side without losing the
metre. The climax comes. The bride bursts into hysterical sobs,
while the women wipe their eyes. A plate, heretofore concealed
under his coat, is whisked out. He has conquered; the inevitable
collection is taken up.
The tuneful procession moves upon the bridegroom. An Essex Street
girl in the crowd, watching them go, says disdainfully: "None of this
humbug when I get married." It is the straining of young America at
the fetters of tradition. Ten minutes later, when, between double
files of women holding candles, the couple pass to the canopy where
the rabbi waits, she has already forgotten; and when the crunching
of a glass under the bridegroom's heel announces that they are one,
and that until the broken pieces be reunited he is hers and hers
alone, she joins with all the company in the exulting shout of
"Mozzel tov!" ("Good luck!"). Then the dupka, men and women
joining in, forgetting all but the moment, hands on hips, stepping in
time, forward, backward, and across. And then the feast.
They sit at the long tables by squads and tribes. Those who belong
together sit together. There is no attempt at pairing off for
conversation or mutual entertainment, at speech-making or toasting.
The business in hand is to eat, and it is attended to. The
bridegroom, at the head of the table, with his shiny silk hat on, sets
the example; and the guests emulate it with zeal, the men smoking
big, strong cigars between mouthfuls. "Gosh! ain't it fine?" is the
grateful comment of one curly-headed youngster, bravely attacking
his third plate of chicken-stew. "Fine as silk," nods his neighbor in
knickerbockers. Christmas, for once, means something to them that
they can understand. The crowd of hurrying waiters make room for
one bearing aloft a small turkey adorned with much tinsel and many
paper flowers. It is for the bride, the one thing not to be touched
until the next day—one day off from the drudgery of housekeeping;
she, too, can keep Christmas.
A group of bearded, dark-browed men sit apart, the rabbi among
them. They are the orthodox, who cannot break bread with the rest,
for fear, though the food be kosher, the plates have been defiled.
They brought their own to the feast, and sit at their own table, stern
and justified. Did they but know what depravity is harbored in the
impish mind of the girl yonder, who plans to hang her stocking
overnight by the window! There is no fireplace in the tenement.
Queer things happen over here, in the strife between the old and the
new. The girls of the College Settlement, last summer, felt compelled
to explain that the holiday in the country which they offered some of
these children was to be spent in an Episcopal clergyman's house,
where they had prayers every morning. "Oh," was the mother's
indulgent answer, "they know it isn't true, so it won't hurt them."
The bell of a neighboring church tower strikes the vesper hour. A
man in working-clothes uncovers his head reverently, and passes on.
Through the vista of green bowers formed of the grocer's stock of
Christmas trees a passing glimpse of flaring torches in the distant
square is caught. They touch with flame the gilt cross towering high
above the "White Garden," as the German residents call Tompkins
Square. On the sidewalk the holy-eve fair is in its busiest hour. In the
pine-board booths stand rows of staring toy dogs alternately with
plaster saints. Red apples and candy are hawked from carts. Pedlers
offer colored candles with shrill outcry. A huckster feeding his horse
by the curb scatters, unseen, a share for the sparrows. The cross
flashes white against the dark sky.
In one of the side streets near the East River has stood for thirty
years a little mission church, called Hope Chapel by its founders, in
the brave spirit in which they built it. It has had plenty of use for the
spirit since. Of the kind of problems that beset its pastor I caught a
glimpse the other day, when, as I entered his room, a rough-looking
man went out.
"One of my cares," said Mr. Devins, looking after him with contracted
brow. "He has spent two Christmas days of twenty-three out of jail.
He is a burglar, or was. His daughter has brought him round. She is
a seamstress. For three months, now, she has been keeping him and
the home, working nights. If I could only get him a job! He won't
stay honest long without it; but who wants a burglar for a
watchman? And how can I recommend him?"
A few doors from the chapel an alley sets into the block. We halted
at the mouth of it.
"Come in," said Mr. Devins, "and wish Blind Jennie a Merry
Christmas."
We went in, in single file; there was not room for two. As we
climbed the creaking stairs of the rear tenement, a chorus of
children's shrill voices burst into song somewhere above.
"It is her class," said the pastor of Hope Chapel, as he stopped on
the landing. "They are all kinds. We never could hope to reach them;
Jennie can. They fetch her the papers given out in the Sunday-
school, and read to her what is printed under the pictures; and she
tells them the story of it. There is nothing Jennie doesn't know about
the Bible."
The door opened upon a low-ceiled room, where the evening shades
lay deep. The red glow from the kitchen stove discovered a jam of
children, young girls mostly, perched on the table, the chairs, in one
another's laps, or squatting on the floor; in the midst of them, a little
old woman with heavily veiled face, and wan, wrinkled hands folded
in her lap. The singing ceased as we stepped across the threshold.
"Be welcome," piped a harsh voice with a singular note of
cheerfulness in it. "Whose step is that with you, pastor? I don't know
it. He is welcome in Jennie's house, whoever he be. Girls, make him
to home." The girls moved up to make room.
"Jennie has not seen since she was a child," said the clergyman,
gently; "but she knows a friend without it. Some day she shall see
the great Friend in his glory, and then she shall be Blind Jennie no
more."
The little woman raised the veil from a face shockingly disfigured,
and touched the eyeless sockets. "Some day," she repeated, "Jennie
shall see. Not long now—not long!" Her pastor patted her hand. The
silence of the dark room was broken by Blind Jennie's voice, rising
cracked and quavering: "Alas! and did my Saviour bleed?" The shrill
chorus burst in:—

It was there by faith I received my sight,


And now I am happy all the day.

The light that falls from the windows of the Neighborhood Guild, in
Delancey Street, makes a white path across the asphalt pavement.
Within, there is mirth and laughter. The Tenth Ward Social Reform
Club is having its Christmas festival. Its members, poor mothers,
scrub-women,—the president is the janitress of a tenement near by,
—have brought their little ones, a few their husbands, to share in
the fun. One little girl has to be dragged up to the grab-bag. She
cries at the sight of Santa Claus. The baby has drawn a woolly
horse. He kisses the toy with a look of ecstatic bliss, and toddles
away. At the far end of the hall a game of blindman's-buff is starting
up. The aged grandmother, who has watched it with growing
excitement, bids one of the settlement workers hold her grandchild,
that she may join in; and she does join in, with all the pent-up
hunger of fifty joyless years. The worker, looking on, smiles; one has
been reached. Thus is the battle against the slum waged and won
with the child's play.
Tramp! tramp! comes the to-morrow upon the stage. Two hundred
and fifty pairs of little feet, keeping step, are marching to dinner in
the Newsboys' Lodging-house. Five hundred pairs more are
restlessly awaiting their turn upstairs. In prison, hospital, and
almshouse to-night the city is host, and gives of her plenty. Here an
unknown friend has spread a generous repast for the waifs who all
the rest of the days shift for themselves as best they can. Turkey,
coffee, and pie, with "vegetubles" to fill in. As the file of eagle-eyed
youngsters passes down the long tables, there are swift movements
of grimy hands, and shirt-waists bulge, ragged coats sag at the
pockets. Hardly is the file seated when the plaint rises: "I ain't got
no pie! It got swiped on me." Seven despoiled ones hold up their
hands.
The superintendent laughs—it is Christmas eve. He taps one
tentatively on the bulging shirt. "What have you here, my lad?"
"Me pie," responds he, with an innocent look; "I wuz scart it would
get stole."
A little fellow who has been eying one of the visitors attentively
takes his knife out of his mouth, and points it at him with conviction.
"I know you," he pipes. "You're a p'lice commissioner. I seen yer
picter in the papers. You're Teddy Roosevelt!"
The clatter of knives and forks ceases suddenly. Seven pies creep
stealthily over the edge of the table, and are replaced on as many
plates. The visitors laugh. It was a case of mistaken identity.
Farthest down town, where the island narrows toward the Battery,
and warehouses crowd the few remaining tenements, the sombre-
hued colony of Syrians is astir with preparation for the holiday. How
comes it that in the only settlement of the real Christmas people in
New York the corner saloon appropriates to itself all the outward
signs of it? Even the floral cross that is nailed over the door of the
Orthodox church is long withered and dead; it has been there since
Easter, and it is yet twelve days to Christmas by the belated
reckoning of the Greek Church. But if the houses show no sign of
the holiday, within there is nothing lacking. The whole colony is gone
a-visiting. There are enough of the unorthodox to set the fashion,
and the rest follow the custom of the country. The men go from
house to house, shake hands, and kiss one another on both cheeks,
with the salutation, "Kol am va antom Salimoon." "Every year and
you are safe," the Syrian guide renders it into English; and a non-
professional interpreter amends it: "May you grow happier year by
year." Arrack made from grapes and flavored with aniseseed, and
candy baked in little white balls like marbles, are served with the
indispensable cigarette; for long callers, the pipe.
In a top-floor room of one of the darkest of the dilapidated
tenements, the dusty window panes of which the last glow in the
winter sky is tinging faintly with red, a dance is in progress. The
guests, most of them fresh from the hillsides of Mount Lebanon,
squat about the room. A reed-pipe and a tambourine furnish the
music. One has the centre of the floor. With a beer jug filled to the
brim on his head, he skips and sways, bending, twisting, kneeling,
gesturing, and keeping time, while the men clap their hands. He lies
down and turns over, but not a drop is spilled. Another succeeds
him, stepping proudly, gracefully, furling and unfurling a
handkerchief like a banner. As he sits down, and the beer goes
around, one in the corner, who looks like a shepherd fresh from his
pasture, strikes up a song—a far-off, lonesome, plaintive lay. "'Far as
the hills,'" says the guide; "a song of the old days and the old
people, now seldom heard." All together croon the refrain. The host
delivers himself of an epic about his love across the seas, with the
most agonizing expression, and in a shockingly bad voice. He is the
worst singer I ever heard; but his companions greet his effort with
approving shouts of "Yi! yi!" They look so fierce, and yet are so
childishly happy, that at the thought of their exile and of the dark
tenement the question arises, "Why all this joy?" The guide answers
it with a look of surprise. "They sing," he says, "because they are
glad they are free. Did you not know?"
The bells in old Trinity chime the midnight hour. From dark hallways
men and women pour forth and hasten to the Maronite church. In
the loft of the dingy old warehouse wax candles burn before an altar
of brass. The priest, in a white robe with a huge gold cross worked
on the back, chants the ritual. The people respond. The women
kneel in the aisles, shrouding their heads in their shawls; a surpliced
acolyte swings his censer; the heavy perfume of burning incense fills
the hall.
The band at the anarchists' ball is tuning up for the last dance.
Young and old float to the happy strains, forgetting injustice,
oppression, hatred. Children slide upon the waxed floor, weaving
fearlessly in and out between the couples—between fierce, bearded
men and short-haired women with crimson-bordered kerchiefs. A
Punch-and-Judy show in the corner evokes shouts of laughter.
Outside the snow is falling. It sifts silently into each nook and corner,
softens all the hard and ugly lines, and throws the spotless mantle of
charity over the blemishes, the shortcomings. Christmas morning will
dawn pure and white.
WHAT THE CHRISTMAS SUN SAW
IN THE TENEMENTS
The December sun shone clear and cold upon the city. It shone upon
rich and poor alike. It shone into the homes of the wealthy on the
avenues and in the up-town streets, and into courts and alleys
hedged in by towering tenements down town. It shone upon throngs
of busy holiday shoppers that went out and in at the big stores,
carrying bundles big and small, all alike filled with Christmas cheer
and kindly messages from Santa Claus.
It shone down so gayly and altogether cheerily there, that wraps
and overcoats were unbuttoned for the north wind to toy with. "My,
isn't it a nice day?" said one young lady in a fur shoulder cape to a
friend, pausing to kiss and compare lists of Christmas gifts.
"Most too hot," was the reply, and the friends passed on. There was
warmth within and without. Life was very pleasant under the
Christmas sun up on the avenue.
Down in Cherry Street the rays of the sun climbed over a row of tall
tenements with an effort that seemed to exhaust all the life that was
in them, and fell into a dirty block, half choked with trucks, with ash
barrels and rubbish of all sorts, among which the dust was whirled in
clouds upon fitful, shivering blasts that searched every nook and
cranny of the big barracks. They fell upon a little girl, barefooted and
in rags, who struggled out of an alley with a broken pitcher in her
grimy fist, against the wind that set down the narrow slit like the
draught through a big factory chimney. Just at the mouth of the
alley it took her with a sudden whirl, a cyclone of dust and drifting
ashes, tossed her fairly off her feet, tore from her grip the
threadbare shawl she clutched at her throat, and set her down at
the saloon door breathless and half smothered. She had just time to
dodge through the storm-doors before another whirlwind swept
whistling down the street.
"My, but isn't it cold?" she said, as she shook the dust out of her
shawl and set the pitcher down on the bar. "Gimme a pint," laying
down a few pennies that had been wrapped in a corner of the shawl,
"and mamma says make it good and full."
"All'us the way with youse kids—want a barrel when yees pays fer a
pint," growled the bartender. "There, run along, and don't ye hang
around that stove no more. We ain't a steam-heatin' the block fer
nothin'."
The little girl clutched her shawl and the pitcher, and slipped out into
the street where the wind lay in ambush and promptly bore down on
her in pillars of whirling dust as soon as she appeared. But the sun
that pitied her bare feet and little frozen hands played a trick on old
Boreas—it showed her a way between the pillars, and only just her
skirt was caught by one and whirled over her head as she dodged
into her alley. It peeped after her halfway down its dark depths,
where it seemed colder even than in the bleak street, but there it
had to leave her.
It did not see her dive through the doorless opening into a hall
where no sun-ray had ever entered. It could not have found its way
in there had it tried. But up the narrow, squeaking stairs the girl with
the pitcher was climbing. Up one flight of stairs, over a knot of
children, half babies, pitching pennies on the landing, over wash-
tubs and bedsteads that encumbered the next—house-cleaning
going on in that "flat"; that is to say, the surplus of bugs was being
turned out with petroleum and a feather—up still another, past a
half-open door through which came the noise of brawling and
curses. She dodged and quickened her step a little until she stood
panting before a door on the fourth landing that opened readily as
she pushed it with her bare foot.
A room almost devoid of stick or rag one might dignify with the
name of furniture. Two chairs, one with a broken back, the other on
three legs, beside a rickety table that stood upright only by leaning
against the wall. On the unwashed floor a heap of straw covered
with dirty bedtick for a bed; a foul-smelling slop-pail in the middle of
the room; a crazy stove, and back of it a door or gap opening upon
darkness. There was something in there, but what it was could only
be surmised from a heavy snore that rose and fell regularly. It was
the bedroom of the apartment, windowless, airless, and sunless, but
rented at a price a millionaire would denounce as robbery.
"That you, Liza?" said a voice that discovered a woman bending over
the stove. "Run 'n' get the childer. Dinner's ready."
The winter sun glancing down the wall of the opposite tenement,
with a hopeless effort to cheer the back yard, might have peeped
through the one window of the room in Mrs. McGroarty's "flat," had
that window not been coated with the dust of ages, and discovered
that dinner party in action. It might have found a score like it in the
alley. Four unkempt children, copies each in his or her way of Liza
and their mother, Mrs. McGroarty, who "did washing" for a living. A
meat bone, a "cut" from the butcher's at four cents a pound, green
pickles, stale bread and beer. Beer for the four, a sup all round, the
baby included. Why not? It was the one relish the searching ray
would have found there. Potatoes were there, too—potatoes and
meat! Say not the poor in the tenements are starving. In New York
only those starve who cannot get work and have not the courage to
beg. Fifty thousand always out of a job, say those who pretend to
know. A round half-million asking and getting charity in eight years,
say the statisticians of the Charity Organization. Any one can go
round and see for himself that no one need starve in New York.
From across the yard the sunbeam, as it crept up the wall, fell
slantingly through the attic window whence issued the sound of
hammer-blows. A man with a hard face stood in its light, driving
nails into the lid of a soap box that was partly filled with straw.
Something else was there; as he shifted the lid that didn't fit, the
glimpse of sunshine fell across it; it was a dead child, a little baby in
a white slip, bedded in straw in a soap box for a coffin. The man was
hammering down the lid to take it to the Potter's Field. At the bed
knelt the mother, dry-eyed, delirious from starvation that had killed
her child. Five hungry, frightened children cowered in the corner,
hardly daring to whisper as they looked from the father to the
mother in terror.
There was a knock on the door that was drowned once, twice, in the
noise of the hammer on the little coffin. Then it was opened gently,
and a young woman came in with a basket. A little silver cross shone
upon her breast. She went to the poor mother, and, putting her
hand soothingly on her head, knelt by her with gentle and loving
words. The half-crazed woman listened with averted face, then
suddenly burst into tears and hid her throbbing head in the other's
lap.
The man stopped hammering and stared fixedly upon the two; the
children gathered around with devouring looks as the visitor took
from her basket bread, meat, and tea. Just then, with a parting
wistful look into the bare attic room, the sun-ray slipped away,
lingered for a moment about the coping outside, and fled over the
housetops.
As it sped on its winter-day journey, did it shine into any cabin in an
Irish bog more desolate than these Cherry Street "homes"? An army
of thousands, whose one bright and wholesome memory, only
tradition of home, is that poverty-stricken cabin in the desolate bog,
are herded in such barracks to-day in New York. Potatoes they have;
yes, and meat at four cents—even seven. Beer for a relish—never
without beer. But home? The home that was home, even in a bog,
with the love of it that has made Ireland immortal and a tower of
strength in the midst of her suffering—what of that? There are no
homes in New York's poor tenements.
Down the crooked path of the Mulberry Street Bend the sunlight
slanted into the heart of New York's Italy. It shone upon bandannas
and yellow neckerchiefs; upon swarthy faces and corduroy breeches;
upon black-haired girls—mothers at thirteen; upon hosts of bow-
legged children rolling in the dirt; upon pedlers' carts and rag-pickers
staggering under burdens that threatened to crush them at every
step. Shone upon unnumbered Pasquales dwelling, working, idling,
and gambling there. Shone upon the filthiest and foulest of New
York's tenements, upon Bandits' Roost, upon Bottle Alley, upon the
hidden byways that lead to the tramps' burrows. Shone upon the
scene of annual infant slaughter. Shone into the foul core of New
York's slums that was at last to go to the realm of bad memories
because civilized man might not look upon it and live without
blushing.
It glanced past the rag-shop in the cellar, whence welled up
stenches to poison the town, into an apartment three flights up that
held two women, one young, the other old and bent. The young one
had a baby at her breast. She was rocking it tenderly in her arms,
singing in the soft Italian tongue a lullaby, while the old granny
listened eagerly, her elbows on her knees, and a stumpy clay pipe,
blackened with age, between her teeth. Her eyes were set on the
wall, on which the musty paper hung in tatters, fit frame for the
wretched, poverty-stricken room, but they saw neither poverty nor
want; her aged limbs felt not the cold draught from without, in
which they shivered; she looked far over the seas to sunny Italy,
whose music was in her ears.
"O dolce Napoli," she mumbled between her toothless jaws, "O suol
beato——"
The song ended in a burst of passionate grief. The old granny and
the baby woke up at once. They were not in sunny Italy; not under
southern, cloudless skies. They were in "The Bend," in Mulberry
Street, and the wintry wind rattled the door as if it would say, in the
language of their new home, the land of the free: "Less music! More
work! Root, hog, or die!"
Around the corner the sunbeam danced with the wind into Mott
Street, lifted the blouse of a Chinaman and made it play tag with his
pigtail. It used him so roughly that he was glad to skip from it down
a cellar-way that gave out fumes of opium strong enough to scare
even the north wind from its purpose. The soles of his felt shoes
showed as he disappeared down the ladder that passed for cellar
steps. Down there, where daylight never came, a group of yellow,
almond-eyed men were bending over a table playing fan-tan. Their
very souls were in the game, every faculty of the mind bent on the
issue and the stake. The one blouse that was indifferent to what
went on was stretched on a mat in a corner. One end of a clumsy
pipe was in his mouth, the other held over a little spirit-lamp on the
divan on which he lay. Something fluttered in the flame with a
pungent, unpleasant smell. The smoker took a long draught, inhaling
the white smoke, then sank back on his couch in senseless content.
Upstairs tiptoed the noiseless felt shoes, bent on some house
errand, to the "household" floors above, where young white girls
from the tenements of The Bend and the East Side live in slavery
worse, if not more galling, than any of the galley with ball and chain
—the slavery of the pipe. Four, eight, sixteen, twenty-odd such
"homes" in this tenement, disgracing the very name of home and
family, for marriage and troth are not in the bargain.
In one room, between the half-drawn curtains of which the sunbeam
works its way in, three girls are lying on as many bunks, smoking all.
They are very young, "under age," though each and every one
would glibly swear in court to the satisfaction of the police that she
is sixteen, and therefore free to make her own bad choice. Of these,
one was brought up among the rugged hills of Maine; the other two
are from the tenement crowds, hardly missed there. But their
companion? She is twirling the sticky brown pill over the lamp,
preparing to fill the bowl of her pipe with it. As she does so, the
sunbeam dances across the bed, kisses the red spot on her cheek
that betrays the secret her tyrant long has known,—though to her it
is hidden yet,—that the pipe has claimed its victim and soon will
pass it on to the Potter's Field.
"Nell," says one of her chums in the other bunk, something stirred
within her by the flash, "Nell, did you hear from the old farm to
home since you come here?"
Nell turns half around, with the toasting-stick in her hand, an ugly
look on her wasted features, a vile oath on her lips.
"To hell with the old farm," she says, and putting the pipe to her
mouth inhales it all, every bit, in one long breath, then falls back on
her pillow in drunken stupor.
That is what the sun of a winter day saw and heard in Mott Street.

It had travelled far toward the west, searching many dark corners
and vainly seeking entry to others; had glided with equal impartiality
the spires of five hundred churches and the tin cornices of thirty
thousand tenements, with their million tenants and more; had
smiled courage and cheer to patient mothers trying to make the
most of life in the teeming crowds, that had too little sunshine by
far; hope to toiling fathers striving early and late for bread to fill the
many mouths clamoring to be fed.
The brief December day was far spent. Now its rays fell across the
North River and lighted up the windows of the tenements in Hell's
Kitchen and Poverty Gap. In the Gap especially they made a brave
show; the windows of the crazy old frame-house under the big tree
that sat back from the street looked as if they were made of beaten
gold. But the glory did not cross the threshold. Within it was dark
and dreary and cold. The room at the foot of the rickety, patched
stairs was empty. The last tenant was beaten to death by her
husband in his drunken fury. The sun's rays shunned the spot ever
after, though it was long since it could have made out the red daub
from the mould on the rotten floor.
Upstairs, in the cold attic, where the wind wailed mournfully through
every open crack, a little girl sat sobbing as if her heart would break.
She hugged an old doll to her breast. The paint was gone from its
face; the yellow hair was in a tangle; its clothes hung in rags. But
she only hugged it closer. It was her doll. They had been friends so
long, shared hunger and hardship together, and now——
Her tears fell faster. One drop trembled upon the wan cheek of the
doll. The last sunbeam shot athwart it and made it glisten like a
priceless jewel. Its glory grew and filled the room. Gone were the
black walls, the darkness, and the cold. There was warmth and light
and joy. Merry voices and glad faces were all about. A flock of
children danced with gleeful shouts about a great Christmas tree in
the middle of the floor. Upon its branches hung drums and trumpets
and toys, and countless candles gleamed like beautiful stars.
Farthest up, at the very top, her doll, her very own, with arms
outstretched, as if appealing to be taken down and hugged. She
knew it, knew the mission-school that had seen her first and only
real Christmas, knew the gentle face of her teacher, and the writing
on the wall she had taught her to spell out: "In His name." His
name, who, she had said, was all little children's friend. Was He also
her dolly's friend, and would He know it among the strange people?
The light went out; the glory faded. The bare room, only colder and
more cheerless than before, was left. The child shivered. Only that
morning the doctor had told her mother that she must have
medicine and food and warmth, or she must go to the great hospital
where papa had gone before, when their money was all spent.
Sorrow and want had laid the mother upon the bed he had barely
left. Every stick of furniture, every stitch of clothing on which money
could be borrowed, had gone to the pawnbroker. Last of all, she had
carried mamma's wedding-ring to pay the druggist. Now there was
no more left, and they had nothing to eat. In a little while mamma
would wake up, hungry.
The little girl smothered a last sob and rose quickly. She wrapped
the doll in a threadbare shawl as well as she could, tiptoed to the
door, and listened a moment to the feeble breathing of the sick
mother within. Then she went out, shutting the door softly behind
her, lest she wake her.
Up the street she went, the way she knew so well, one block and a
turn round the saloon corner, the sunset glow kissing the track of
her bare feet in the snow as she went, to a door that rang a noisy
bell as she opened it and went in. A musty smell filled the close
room. Packages, great and small, lay piled high on shelves behind
the worn counter. A slovenly woman was haggling with the
pawnbroker about the money for a skirt she had brought to pledge.
"Not a cent more than a quarter," he said, contemptuously, tossing
the garment aside. "It's half worn out it is, dragging it back and
forth over the counter these six months. Take it or leave it. Hallo!
What have we here? Little Finnegan, eh? Your mother not dead yet?
It's in the poor-house ye will be if she lasts much longer. What the
——"
He had taken the package from the trembling child's hand—the
precious doll—and unrolled the shawl. A moment he stood staring in
dumb amazement at its contents. Then he caught it up and flung it
with an angry oath upon the floor, where it was shivered against the
coal-box.
"Get out o' here, ye Finnegan brat," he shouted; "I'll tache ye to
come a-guyin' o' me. I'll——"
The door closed with a bang upon the frightened child, alone in the
cold night. The sun saw not its home-coming. It had hidden behind
the night clouds, weary of the sight of man and his cruelty.
Evening had worn into night. The busy city slept. Down by the
wharves, now deserted, a poor boy sat on the bulwark, hungry, foot-
sore, and shivering with cold. He sat thinking of friends and home,
thousands of miles away over the sea, whom he had left six months
before to go among strangers. He had been alone ever since, but
never more so than that night. His money gone, no work to be
found, he had slept in the streets for nights. That day he had eaten
nothing; he would rather die than beg, and one of the two he must
do soon.
There was the dark river rushing at his feet; the swirl of the unseen
waters whispered to him of rest and peace he had not known since
—it was so cold—and who was there to care, he thought bitterly. No
one would ever know. He moved a little nearer the edge, and
listened more intently.
A low whine fell on his ear, and a cold, wet face was pressed against
his. A little crippled dog that had been crouching silently beside him
nestled in his lap. He had picked it up in the street, as forlorn and
friendless as himself, and it had stayed by him. Its touch recalled
him to himself. He got up hastily, and, taking the dog in his arms,
went to the police station near by, and asked for shelter. It was the
first time he had accepted even such charity, and as he lay down on
his rough plank he hugged a little gold locket he wore around his
neck, the last link with better days, and thought with a hard sob of
home. In the middle of the night he awoke with a start. The locket
was gone. One of the tramps who slept with him had stolen it. With
bitter tears he went up and complained to the Sergeant at the desk,
and the Sergeant ordered him to be kicked out into the street as a
liar, if not a thief. How should a tramp boy have come honestly by a
gold locket? The doorman put him out as he was bidden, and when
the little dog showed its teeth, a policeman seized it and clubbed it
to death on the step.
Far from the slumbering city the rising moon shines over a wide
expanse of glistening water. It silvers the snow upon a barren heath
between two shores, and shortens with each passing minute the
shadows of countless headstones that bear no names, only
numbers. The breakers that beat against the bluff wake not those
who sleep there. In the deep trenches they lie, shoulder to shoulder,
an army of brothers, homeless in life, but here at rest and at peace.
A great cross stands upon the lonely shore. The moon sheds its rays
upon it in silent benediction and floods the garden of the unknown,
unmourned dead with its soft light. Out on the Sound the fishermen
see it flashing white against the starlit sky, and bare their heads
reverently as their boats speed by, borne upon the wings of the west
wind.
NIBSY'S CHRISTMAS
It was Christmas Eve over on the East Side. Darkness was closing in
on a cold, hard day. The light that struggled through the frozen
windows of the delicatessen store and the saloon on the corner, fell
upon men with empty dinner-pails who were hurrying homeward,
their coats buttoned tightly, and heads bent against the steady blast
from the river, as if they were butting their way down the street.
The wind had forced the door of the saloon ajar, and was whistling
through the crack; but in there it seemed to make no one afraid.
Between roars of laughter, the clink of glasses and the rattle of dice
on the hardwood counter were heard out in the street. More than
one of the passers-by who came within range was taken with an
extra shiver in which the vision of wife and little ones waiting at
home for his coming was snuffed out, as he dropped in to brace up.
The lights were long out when the silent streets reëchoed his
unsteady steps toward home, where the Christmas welcome had
turned to dread.
But in this twilight hour they burned brightly yet, trying hard to
pierce the bitter cold outside with a ray of warmth and cheer. Where
the lamps in the delicatessen store made a mottled streak of
brightness across the flags, two little boys stood with their noses
flattened against the window. The warmth inside, and the lights, had
made little islands of clear space on the frosty pane, affording
glimpses of the wealth within, of the piles of smoked herring, of
golden cheese, of sliced bacon and generous, fat-bellied hams; of
the rows of odd-shaped bottles and jars on the shelves that held
there was no telling what good things, only it was certain that they
must be good from the looks of them.
And the heavenly smell of spices and things that reached the boys
through the open door each time the tinkling bell announced the
coming or going of a customer! Better than all, back there on the
top shelf the stacks of square honey-cakes, with their frosty coats of
sugar, tied in bundles with strips of blue paper.
The wind blew straight through the patched and threadbare jackets
of the lads as they crept closer to the window, struggling hard by
breathing on the pane to make their peep-holes bigger, to take in
the whole of the big cake with the almonds set in; but they did not
heed it.
"Jim!" piped the smaller of the two, after a longer stare than usual;
"hey, Jim! them's Sante Claus's. See 'em?"
"Sante Claus!" snorted the other, scornfully, applying his eye to the
clear spot on the pane. "There ain't no ole duffer like dat. Them's
honey-cakes. Me 'n' Tom had a bite o' one wunst."
"There ain't no Sante Claus?" retorted the smaller shaver, hotly, at
his peep-hole. "There is, too. I seen him myself when he cum to our
alley last——"
"What's youse kids a-scrappin' fur?" broke in a strange voice.
Another boy, bigger, but dirtier and tougher-looking than either of
the two, had come up behind them unobserved. He carried an
armful of unsold "extras" under one arm. The other was buried to
the elbow in the pocket of his ragged trousers.
The "kids" knew him, evidently, and the smallest eagerly accepted
him as umpire.
"It's Jim w'at says there ain't no Sante Claus, and I seen him——"
"Jim!" demanded the elder ragamuffin, sternly, looking hard at the
culprit; "Jim! yere a chump! No Sante Claus? What're ye givin' us?
Now, watch me!"
With utter amazement the boys saw him disappear through the door
under the tinkling bell into the charmed precincts of smoked herring,
jam, and honey-cakes. Petrified at their peep-holes, they watched
him, in the veritable presence of Santa Claus himself with the fir-
branch, fish out five battered pennies from the depths of his pocket
and pass them over to the woman behind the jars, in exchange for
one of the bundles of honey-cakes tied with blue. As if in a dream
they saw him issue forth with the coveted prize.
"There, kid!" he said, holding out the two fattest and whitest cakes
to Santa Claus's champion; "there's yer Christmas. Run along, now,
to yer barracks; and you, Jim, here's one for you, though yer don't
desarve it. Mind ye let the kid alone."
"This one'll have to do for me grub, I guess. I ain't sold me 'Newses,'
and the ole man'll kick if I bring 'em home."
Before the shuffling feet of the ragamuffins hurrying homeward had
turned the corner, the last mouthful of the newsboy's supper was
smothered in a yell of "Extree!" as he shot across the street to
intercept a passing stranger.

As the evening wore on, it grew rawer and more blustering still.
Flakes of dry snow that stayed where they fell, slowly tracing the
curb-lines, the shutters, and the doorsteps of the tenements with
gathering white, were borne up on the storm from the water. To the
right and left stretched endless streets between the towering
barracks, as beneath frowning cliffs pierced with a thousand glowing
eyes that revealed the watch-fires within—a mighty city of cave-
dwellers held in the thraldom of poverty and want.

You might also like