How To Create A WebsiteHow To Make A Website

HTML 4

How 2 Create A Website | HTML Tutorials - Body Section


bookmark website

 
HTML Body Tags

Between the body tags your content will be written. Body attributes e.g. background, text color, hyperlink colors can now be done with CSS.

In HTML 4 there are two attributes that are used.

  1. Onload
  2. Unload

The above are used with scripts.

Here is an example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Body Section Onload Tag Example</title>
</head>

<body onload="alert('This is a test!')" >

</body>
</html>

Test html onload body tags example here

If you open the this html code in a web browser then "This is a test!" will popup.

Let's look at other tags that you can use between the <body> </body> tags.

Paragraphs

A handy tag to use to separate text into paragraphs is the paragraph tag <p> </p>.

These tags add a blank line before and after the text text they enclose. In older browsers you only need the <p> tag to create a paragraph.

Example:

This is a test 1. This is a test 2. this is a test 3.

The result is as follows:

This is a test 1.

This is a test 2.

This is a test 3.

The code:

<p>This is a test 1.</p>
<p>This is a test 2.</p>
<p>This is a test 3.</p>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Body Section Tag Example</title>
</head>

<body>

<p>This is a test 1.</p>
<p>This is a test 2.</p>
<p>This is a test 3.</p>

</body>
</html>

Test html paragraph tags example here

HTML Blockquote

Blockquote tags can be used to insert small snippets of quoted text in regular content.

<blockquote> </blockquote>

HTML Line Breaks

The line break tag <br> places a break after the end of a line of text and then goes to the next line.

Example:

The following sentences is a test. Will look as follows.

The following sentences is a test.
Will look as follows.

The code:

<p>The following sentences is a test. <br>Will look as follows.</p>  

Document Headings

When you create a webpages then it will be a good idea to have headings for your articles. HTML headings are used just like headings in books and newspapers. Headings divide various sections on your pages.

HTML have 6 heading sizes. It start from 1 to 6.

<body>

         <h1> H1 Font </h1>

         <h2> H1 Font</h2>

         <h3> H1 Font</h3>

         <h4> H1 Font</h4>

         <h5> H1 Font</h5>

         <h6> H1 Font</h6>

</body>

This is the result of the above html code.

How 2 create a website html headings

 

 

 

 

 

 

 

 

 

 

Changing the font type, color and size of a phrase or word is common in HTML authoring. To add text to a web page, the simply add the text between the <body> </body> tags.

Formatting Text

HTML include elements that can change the style of text.

  • Bold - <b> </b>
  • Italic - <i> </i>
  • Underline - <u> </u>

Example:

  • Check this bold text - <B>bold</B>
  • Check this italic text - <I>italic</I>
  • Check this underline text -
    <U>underline</U>

Other text formatting include:

  • <small> </small> - Smaller font size
  • <big> </big> - Larger font size
  • <tt> </tt> - Fixed width font
  • <sup> </sup> - Superscript
  • <sub> </sub> - Subscript

Formatting Font Size, Face And Color

<body>

<p><font face="Times New Roman" color="#008080" size="5">This an example of text formatting</font></p>

</body>

This is how it will look:

This an example of text formatting

The above metioned tags are just a couple of tags that can be used between the body tags.

next | working with html code tutorials

 

| Create a Website | Get Traffic to Website | Make Money Online With Website | About Us | Contact Us |

© 2008 How-2-make-a-website.com