Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Positioning Text

  • Besides controlling the size of the text, you will also want to control the placement of the text. In HTML placing text is very, very difficult because the language is meant to describe structure, not layout. For example, since HTML does not really pay attention to white space, you cannot simply tab groups of text over.

  • However, there are a few tags that you can use for basic layout that are discussed in the following table.

Opening Tag/Closing Tag Description
<CENTER>...</CENTER> Centers the text between the tags[1]
<BLOCKQUOTE></BLOCKQUOTE> Indents the text between the tags[2]
<NOBR>...</NOBR> Browser Specific
Specifies that the browser should not word wrap the text within the tags.[3]
<PRE>...</PRE> Specifies that text should be displayed as pre-formatted text. This tag was not exactly meant to be used for positioning text, but it can be. In fact, many web designers have created some very nice ASCII art sites using this tag. Check out Crystal Water's Page for a great example.
  • The following HTML code demonstrates how you might use these tags

<HTML>
<HEAD>
<TITLE>Text Positioning</TITLE>
</HEAD>
<BODY>

This is normal text
<CENTER>This is centered text</CENTER>
<BLOCKQUOTE>This is blockquoted text</BLOCKQUOTE>
<NOBR>This is text that will 
not stop even when the browser wants to word wrap</NOBR>
</BODY>
</HTML>

  • The following figure shows the above HTML in the browser's window.

  • Notice that both the <CENTER> and the <BLOCKQUOTE> tags have an embedded new line character in them although this is browser dependent last I checked.

Layout Resources

Sizing Text
Introduction to Web Design | Table of Contents
Text Styles



Up to => Home / Authoring / HTML / Tutorial




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers