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


Basic HTML Body Tags

  • Once you have defined the minimum HTML document, it is time to go about displaying some information. For the most part, displaying information is a matter of simply typing text into the body of the HTML document (between the <BODY> and </BODY> tags).

  • However, as we mentioned earlier, web browsers do not pay attention to white space, thus the following bits of text are displayed exactly the same way in a web browser window.

    This is some text that is displayed
    as you would expect
    
    
    This     is  some     text
    that is displayed in a way
    you
    would not expect:
    exactly the same as the above
    

  • To display line breaks and begin new paragraphs, you must specify exactly where you want them to go. (Making two spaces between characters is another matter and will be covered in Day Two).

  • To specify a new paragraph, you will use the <P> tag and to specify a line break, you will use the <BR> tag.

  • You can also instruct the browser draw a line between text using the <HR> tag, but many design theorists recommend against using the tag.

  • The following table reviews the features of the tags

Opening Tag/Closing Tag Description
<P>...</P> Indicates a new paragraph and instructs the browser to add a blank line. Takes optional alignment parameters of LEFT, RIGHT or CENTER to align the paragraph.[1]
<BR> None Forces a line break in the text. This tag takes an optional parameter to specify how text should wrap around images however we will discuss this on Day Two.
<HR> None This tag creates a horizontal line across the screen. By default the line will span the entire width of the document according to the specifications of BLOCKQUOTE and LIST tags. However, you can modify the look of the line by using any of the following attributes. ALIGN may equal LEFT, RIGHT, or CENTER. SIZE may equal some pixel value. WIDTH may equal some pixel value or some percentage of the document width. NOSHADE will turn off the beveling look. COLOR may equal some color hexvalue.[2]

Basic HTML Body Tags by Example

  • The following HTML code shows the basic HTML body tags in action.

<HTML>
<HEAD>
<TITLE>Body Tag Example</TITLE>
</HEAD>
<BODY>
 
This is a very simple web page.  Notice that           
the browser does not pay  attention  to   spaces
that we 
add to our document unless you specify what type
of spacing                             you want

<P>

Like when you use a paragraph tag or a <BR>
break line tag

<P>

And here is a hard rule



<HR 	ALIGN 	= "CENTER"
	SIZE 	= "10"
	WIDTH	= "50%" 
	COLOR	= "AA0000" NOSHADE>

</BODY>
</HTML>

  • When read by a web browser, the previous HTML code would look like the following:

HTML Resources:

Basic HTML Tags
Introduction to Web Design | Table of Contents
Coding Style


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