bar
Text Alignment Tags
bar

Home | Classes | Resources | Newsletter | WOW | Discussions



Following are some samples of text alignment options you may want to use on your Web page. To view the actual HTML code for each example, click VIEW-PAGE SOURCE (or VIEW-SOURCE) and scroll down the example you are interested in.




This Subhead Is Centered

This paragraph is filler text so you can see how far across the page the text extends. Since there are no HTML tags influencing the position of this text, this line of text extends from one edge of the browser window to the other. Because of this, the subhead above appears to be centered in the browser window. In the table below, however, the subhead is centered within the right cell of the table.

Blah, blah, blah

This Subhead Is Also Centered

This paragraph is filler text so you can see how far across the page the text extends. Since this text appears within an HTML table, it does not stretch across the entire page. The subhead above is centered across this cell of the table, not across the entire browser window.



Breaking Up Text With Line Breaks

Text without line breaks:

There once was a man from Carthay who coded hypertext night and day. But it was a drag 'cause he didn't know the tag, and his text clumped together like clay.

Text with line breaks:

There once was a man from Carthay
who coded hypertext night and day.
But it was a drag
'cause he didn't know the tag,
and his text clumped together like clay.

The Cumulative Effect of Line Breaks:

1. This text has no line breaks in it. It is all on one line.

2. This text has one line break in it.
The text is on two lines.

3. This text has two line breaks in it.

Now the two lines of text are separated by a blank line.

4. This text has three line breaks in it.


Now the two lines of text are separated by two blank lines.


Aligning Text With the Paragraph Tags

People often use the Paragraph tag to generate a blank horizontal space between two lines of text. You can create the same effect using two Line Break tags.

1. This text is separated

by two Line Break Tags.

2. This text is separated

by one Paragraph tag.

Paragraph tags can also be used to control alignment:

This text is aligned left by default.

This text is aligned right.

This text is centered.

This text is aligned using a Center tag, but you can override the Center tag by using a Paragraph tag with a modifier, as shown in the paragraph below.

This text is aligned left using Paragraph tags, even though it's surrounded by Center tags.

Now the previous paragraph has ended, and this new paragraph is back under the influence of the Center tags.




Wrapping Things Up

Below is the invitation list for next month's cattle rustling. Try making your browser as wide as possible and then as narrow as possible. Notice how the text wraps differently depending on how the No Break and Word Break tags are used.

Example 1: No Break and Word Break tags are not used. The text below wraps, but sometimes the names get split up on separate lines.

Billy the Kid, Doc Holiday, Calamity Jane, Buffalo Bill, Butch Cassidy, The Sundance Kid, Pancho Villa, Jesse James, Annie Oakley, Hoss Cartwright.

Example 2: The No Break tags surround the list of names. The text below stays on one line, and you must scroll to the right to read it.

Billy the Kid, Doc Holiday, Calamity Jane, Buffalo Bill, Butch Cassidy, The Sundance Kid, Pancho Villa, Jesse James, Annie Oakley, Hoss Cartwright.

Example 3: No Break and Word Break are used together. The No Break tags surround the list of names, and the Word Break tags surround each person's full name. The text below wraps, but each person's first name and surname are kept together on the same line.

Billy the Kid, Doc Holiday, Calamity Jane, Buffalo Bill, Butch Cassidy, The Sundance Kid, Pancho Villa, Jesse James, Annie Oakley, Hoss Cartwright.


Dividing Up World Leaders and Formatting Them According to Their Views

LEFT:
Fidel Castro
Ted Kennedy
Mao Tse-tung
RIGHT:
Imelda Marcos
Ronald Reagan
Margaret Thatcher
MODERATES:
Bill Clinton
Colin Powell
William Weld



A Declaration of the Independence of Cyberspace

by John Perry Barlow--February 9, 1996

Governments of the Industrial World, you weary giants of flesh and steel, I come from Cyberspace, the new home of Mind. On behalf of the future, I ask you of the past to leave us alone. You are not welcome among us. You have no sovereignty where we gather.

We have no elected government, nor are we likely to have one, so I address you with no greater authority than that with which liberty itself always speaks. I declare the global social space we are building to be naturally independent of the tyrannies you seek to impose on us. You have no moral right to rule us, nor do you possess any methods of enforcement we have true reason to fear.

Governments derive their just powers from the consent of the governed. You have neither solicited nor received ours. We did not invite you. You do not know us, nor do you know our world. Cyberspace does not lie within your borders. Do not think that you can build it, as though it were a public construction project. You cannot. It is an act of nature and it grows itself through our collective actions.

You have not engaged in our great and gathering conversation, nor did you create the wealth of our marketplaces. You do not know our culture, our ethics, or the unwritten codes that already provide our society more order than could be obtained by any of your impositions.

You claim there are problems among us that you need to solve. You use this claim as an excuse to invade our precincts. Many of these problems don't exist. Where there are real conflicts, where there are wrongs, we will identify them and address them by our means. We are forming our own Social Contract. This governance will arise according to the conditions of our world, not yours. Our world is different.

Cyberspace consists of transactions, relationships, and thought itself, arrayed like a standing wave in the Web of our communications. Ours is a world that is both everywhere and nowhere, but it is not where bodies live.

We are creating a world that all may enter without privilege or prejudice accorded by race, economic power, military force, or station of birth.

We are creating a world where anyone, anywhere may express his or her beliefs, no matter how singular, without fear of being coerced into silence or conformity.

Your legal concepts of property, expression, identity, movement, and context do not apply to us. They are based on matter. There is no matter here.

Our identities have no bodies, so, unlike you, we cannot obtain order by physical coercion. We believe that from ethics, enlightened self-interest, and the commonweal, our governance will emerge. Our identities may be distributed across many of your jurisdictions. The only law that all our constituent cultures would generally recognize is the Golden Rule. We hope we will be able to build our particular solutions on that basis. But we cannot accept the solutions you are attempting to impose.

In the United States, you have today created a law, the Telecommunications Reform Act, which repudiates your own Constitution and insults the dreams of Jefferson, Washington, Mill, Madison, DeToqueville, and Brandeis. These dreams must now be born anew in us.

You are terrified of your own children, since they are natives in a world where you will always be immigrants. Because you fear them, you entrust your bureaucracies with the parental responsibilities you are too cowardly to confront yourselves. In our world, all the sentiments and expressions of humanity, from the debasing to the angelic, are parts of a seamless whole, the global conversation of bits. We cannot separate the air that chokes from the air upon which wings beat.

In China, Germany, France, Russia, Singapore, Italy, and the United States, you are trying to ward off the virus of liberty by erecting guard posts at the frontiers of Cyberspace. These may keep out the contagion for a small time, but they will not work in a world that will soon be blanketed in bit-bearing media.

Your increasingly obsolete information industries would perpetuate themselves by proposing laws, in America and elsewhere, that claim to own speech itself throughout the world. These laws would declare ideas to be another industrial product, no more noble than pig iron. In our world, whatever the human mind may create can be reproduced and distributed infinitely at no cost. The global conveyance of thought no longer requires your factories to accomplish.

These increasingly hostile and colonial measures place us in the same position as those previous lovers of freedom and self-determination who had to reject the authorities of distant, uninformed powers. We must declare our virtual selves immune to your sovereignty, even as we continue to consent to your rule over our bodies. We will spread ourselves across the Planet so that no one can arrest our thoughts.

We will create a civilization of the Mind in Cyberspace. May it be more humane and fair than the world your governments have made before.