Lesson-3 (Designing the Body Section)

The body section contains the actual content of the web page. A web page designer must design the body section very carefully. The designer must concentrate on two important aspects. They are

Regarding the matter to be presented, one must be precise. The message must be designed concisely and explicitly. Regarding the way of presentation one must carefully split the message into several pages and define the hyperlinks. The color of the text, background design and background color must be chosen with aesthetic sense. they must be presented with proper headings. The text must be properly aligned. This chapter deals with the HTML tools for designing the body section.
  3.1 Heading printing

In HTML we can print headings using any one of the six tags<h1>, <h2>, <h3>, <h4>, <h5> or <h6>, <h1>, denoting the largest size heading. When we give the <H2> tag the heading is smaller. The <H3> tag makes a still smaller heading. Consider the following HTML documents

<h1> Department of computer scince</h1>
<h2> Department of computer scince </h2>
<h3> Department of computer scince </h3>
<h4> Department of computer scince </h4>
<h5> Department of computer scince </h5>
<h6> Department of computer scince </h6>

The output is shown below
  3.2 Aligning The Heading

We can also align the heading to the left, right or center. The following are the four types of alignments:-

  1. Left
  2. Right
  3. Center
  4. Justified

This is done by including the align information in the head tag. For example, consider the following HTML document which aligns a heading to the right.

Right Aligned Heading

Left Aligned Heading

Center Aligned Heading

Justified Aligned Heading

  3.3 Horizontal Rule

A horizontal rule can be created using the <hr> tag. For example, consider the following
<h1> Department of Computer Science </h1>
<hr>
The output will be as shown below:-

Department of Computer Science

There are four attributes to the <hr> tag.All of which are optional. They are   3.3.1 Size of the Horizontal Rule

Consider the following code:
Department of computer scince
<hr size=1>
Courses offered
<hr size=5>B.C.A Computer Scince
<hr size=10>The output got in is shown below:-

  3.3.2 Width of the Horizontal Rule

Consider the following code:
<hr><center>computer scince </hr></center>
<hr size=5 width=25%>

  3.3.3 Alignment of the Horizontal Rule

Consider the following code:
<h4>computer scince </h4>
<hr size=5 width=25% align=right>
<h4>computer scince </h4>
<hr size=5 width=25% align=left>

  3.4 Paragraph

Whenever we give the break tag <br>, the subsequent text appears in a new line. Also, if we want to align paragraphs, we can mark the beginning and the end of a paragraph by <p> and </p> respectively. It is possible to align a paragraph left,right,center or justified.When a paragraph ends, a blank line is left. For example, consider the following HTML document.
<Left Aligned><p align=left>Mathematical design, analysis and implementation of traffic information system for Tirunelveli city bus service is a project work which has been undertaken by the computer science research laboratory.</p>
<Right Aligned><p align=right>Dr C.Xavier is the principal investigator of this project and he is designing and developing the software system for the same. </p>
<Center Aligned><p align=center> It is funded by the Department of Science and Technology, Government of India.</p>

The HTML page appears in the web page as shown below:-   3.4.1 Binding Spaces

HTML automatically adjusts the intermediate spaces and aligns the text as per the given format. For such alignments, HTML itself inserts some spaces. Such spaces are called soft spaces.The spaces inserted by the user are called hard spaces.

  3.5 Tab Settings

Consider the following notification:-

ABC College(Autonomous)

Chandigarh

Department of Computer Science
Seminar on HTML Programming

The Department of Computer Science, in its continuing effort to impart knowledge on the latest topics to students, is arranging the following seminar on HTML programming.
Day         :    Friday
Date        :    December 5, 1997
Time        :    3.00
Speaker   :    Dr S S Lyengar
Venue      :    Loyola Hall

Head of the Department