The Body Section of an HTML Web Page

<BODY> and </BODY>: the Main Section of a HTML Web Page Intro

The Body of your HTML web page is where the main magic happens, so let’s begin! Let’s start with basic text formatting, and how you can display the text you want on your page. Anything between the <BODY> and </BODY> tags will show up on your site. So for instance, the following code:

<HTML>

<HEAD><TITLE>Hello World</TITLE></HEAD>

<BODY>

This is a test message.

</BODY>

</HTML>

Will show the following web page:

Body Text Demo

Now let’s get to the different ways that we can format our text. We can choose the font, but keep in mind that font selection for web sites is very small. If a user does not have the font that you specify installed, they will see Times New Roman. A way to get around this is to include multiple similar fonts, and only if the user doesn’t have any of them installed will the default be shown. The <FONT> tag can be used to define the actual font to be used as such:

<FONT face=”Arial”> or <FONT face=”times new roman”>

To include multiple choices, you separate with a comma:

<FONT face=”arial,verdana”>

In this case, if someone does not have Arial, they will see Verdana. If they do not have Verdana, they will see times New Roman.

A quick note on caps - caps do not matter in HTML. I am using capital letters in this document only to make tags readily apparent. In practice, I more commonly use <html>, <body>, <font>, etc. Go with whatever is more appealing to you. Caps can make it easy to read the code later, but perhaps is more of an eye sore.

Anyway, that’s it for this HTML tutorial on the <BODY> tag section of an HTML web page. On the next tutorial, we’ll see how you can change the font style for the text in the <body>.



If you like "The Body Section of an HTML Web Page,"
please consider linking to this article:

Leave a Reply




(spam protection)
Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Subscribe without commenting

« Previous
« A Complete HTML Table Tutorial - with Code/Format Examples | Up Top | HTML Font Properties, Usage and Examples »
Recent Comments
James Smith: Wow… I’m stunned you could do that.
e-orchids: very nice article thanks for posting….. E-orchids
Html Meta Tag: It’s an enormous advantage to have read your post. In fact, I learn a lot from it. It was certainly...
Medical Web Experts: Nice post!!! Really an amazing observation regarding the advantages of flash! Flash has been...
Web Tasarım: This is very nice post. thank you.
Web Design Development: Testing comment.