TechKnow : Website Designing Course

a product of KnowNet ®
 

MODULE 2 : THE TEN COMMANDMENTS OF HTML.


In this module we will learn some basic but most widely used commands for designing the layout of a webpage. Knowing these commands you can do a lot of things such as change the paragraph alignment, change the spacing between two lines, change the font type, size and colour, and make an ordered or an unordered list etc. In short, you would have mastered almost 75% of webpage designing part.


Let's Get Started !

In this module, I will first show you a sample webpage (see the image below) as it appears on viewing with a web browser say Netscape Navigator or Internet Explorer and then explain the HTML Source Codes behind it. Actually it is one complete page but when viewed on a website viewer package - you will have to scroll below to see the entire page- so it has been broken into two images.

The webpage shown is that of an imaginary Rural Development Organisation named "Gyan".

"Gyan" is a Hindi word which means "Knowledge" ("Gyan" is what we all are seeking!). The broad vision of the organisation is "Local Self Governance through Knowledge Sharing". Gyan was formed in 1994 by a miscellany group of people and its head office is based in New Delhi. It has four regional offices in Jaipur, Bhopal, Hyderabad and Bangalore.

I assure you - that by end of this Module 2 you will be able to design an even better webpage of your organisation, your community or even of yourself than what is shown.

Now let us turn to your computer screen!

Open up a new file in your word editor, say Word Pad. Based on the learnings of Module 1, create the HEAD portion of this new file and leave the BODY portion blank for the time being. Save the file as gyan.html. Alternatively you may say it as gyan.txt and then rename it as gyan.html.
 

Your file gyan.html will now read something like this:
 
 
<HTML>

<HEAD>

<TITLE>Webpage of Gyan </TITLE> 

<META name="description" content ="Designing of webpage for a rural development organisation called Gyan">

<META name="keywords" content ="web page, Gyan, governance, knowledge, sharing, 1994, Delhi, Jaipur, Bhopal, Hyderabad, Bangalore"> 

</HEAD> 

<BODY> ------------- marking the beginning of the BODY
 
 

</BODY> ------------- marking the end the BODY

</HTML> 


 

We will now step by step create the BODY of the webpage to look the same as the webpage of Gyan as shown in the image. The TEN COMMANDS of HTML follow:


THE "BOLD" COMMAND

<B>    </B>

To make any word, line or an entire paragraph Bold, place <B> at the start of it and </B> towards the end of it.  All the text appearing between <B> and </B> will now appear Bold when viewed with a web browser.

NOTE : <B> and </B> command has been used to make the word "GYAN" appear in Bold in the starting line of the sample webpage. <B> and </B> command has also been used to make words "Regional Offices" appear in Bold. Let us do the same thing in the file you have created.
 

Your file gyan.html will now read something like this:
 
 
<BODY> 

<B>GYAN</B> ------------- makes the word "GYAN" appear in BOLD

<B>Regional Offices</B> ------------- makes the word "Regional Offices" appear in BOLD

</BODY>

Now if you have understood how to use the BOLD command, then you have also learnt how to use the ITALICS command and the UNDERLINE command.

Use <I> and </I> to make a statement appear in Italics as in the case of second line of the sample webpage where it is written "Local Self Governance through Knowledge Sharing".

Use <U> and </U> to Underline a statement or a word. Any thing appearing between the codes <U> and </U> will appear underlined when viewed with a browser as in the case of the phrase "Core Values" as seen in the sample webpage. Let us use these two commands in the file you have created.

Your file gyan.html will now read something like this:
 
 
<BODY> 
<B>GYAN< /B>

<I>Local Self Governance through Knowledge Sharing</I> ------------- makes the statement appear in Italics

<U>Core Values</U>  ------------ makes the phrase appear Underlined

<B>Regional Offices</B> 

</BODY>



 
Let us once again go over the THREE COMMANDS we have learnt.

BOLD                        <B>       </B>

ITALICS                     <I >      </I >

UNDERLINE             <U>      </U>

 



 

THE "PARAGRAPH" COMMAND

<P>   </P>

The "Paragraph" Command is used to create a paragraph and align it either left, right, center or full. The command is very simple to use. <P> denotes the start of a Paragraph and </P> denotes the end of the Paragraph. The <P> command leaves ONE BLANK LINE before the start of the Paragraph while the </P> command leaves  ONE BLANK LINE  at the end of the paragraph when seen through the website viewer.

NOTE : <P> and </P> command has been used to separate the word "GYAN" appearing  at the top of the sample webpage with the line "Local Self Governance through Knowledge Sharing".

Similarly, <P> and </P> command has been used to separate the paragraph "The overall mission of GYAN is to use the sword of knowledge-sharing ............  create equal opportunities to everyone to improve their quality of lives" from the paragraph  "Gyan was formed in 1994, with the involvement of a miscellany group .............  as an autonomous body under the Society Registeration Act of India".

Similarly <P> and </P> command has been used to separate the paragraph "Gyan was formed in 1994, with the involvement of a miscellany group .............  as an autonomous body under the Society Registeration Act of India" from the paragraph "Core Values"and the paragraph "Regional Offices".
 

Let us try using the PARAGRAPH command in the file are working on.
 

Your file gyan.html will now read something like this:
 
 
<BODY> 

<P><B>GYAN</B></P> ------------- transforms the word "GYAN" into a separate paragraph.
 

<P><I>Local Self Governance through Knowledge Sharing</I></P> ------------- transforms the sentence into a separate paragraph.
 

<P> The overall mission of GYAN is to use the sword of knowledge-sharing to empower people by building capacities in them to understand local governance structures and helping them play an active and informed role in decision-making. The aim of empowering people is to shape their lives and create equal opportunities to everyone to improve their quality of lives. </P> ------------- transforms the sentences into a separate paragraph.
 

<P>Gyan was formed in 1994, with the involvement of a miscellany group of people comprising of academicians, grassroots practitioners, social scientists, media person and members of the judiciary. The organisation is registered as an autonomous body under the Society Registration Act of India. </P> ------------ transforms the sentences into a separate paragraph.
 

<P><U>Core Values</U></P>  ------------- transforms the phrase into a separate paragraph.

<P><B>Regional Offices</B></P> ------------- transforms the phrase into a separate paragraph.

</BODY>

Time to save this file "gyan.html" and view it in the web browser say Netscape Navigator. On viewing you will find that the file you are creating is starting to resemble the sample webpage shown above, except for the Paragraph Alignment.



Now we will learn how to align a Paragraph - Left, Right, Center and Full (both sides).
 

To LEFT Align a paragraph, we use the command  <P align="LEFT"> and </P>.

To RIGHT Align a paragraph, we use the command <P align="RIGHT"> and </P>.

To CENTER Align a paragraph, we use the command <P align="CENTER"> and </P>.

To FULLY  Align  a  paragraph, ( i.e both LEFTandRIGHT  Aligned paragraphwe  use  the  command
<P align="JUSTIFY"> and </P>

Note :  LEFT Align is the "DEFAULT" alignment when we use only <P> and </P> commands.


Now if you look at the sample webpage of "Gyan" you will find that :


Let us try using the PARAGRAPH ALIGNMENT command in the file are working on.
 

Your file gyan.html will now read something like this:
 
 
<BODY> 

<P Align="CENTER"><b>GYAN</b></P> ------------- Center Aligns the  word "GYAN". 
 

<P Align ="RIGHT"><I>Local Self Governance through Knowledge Sharing</I></P> ------------- Right Aligns the Paragraph.
 

<P Align="JUSTIFY">The overall mission of GYAN is to use the sword of knowledge-sharing to empower people by building capacities in them to understand local governance structures and helping them play an active and informed role in decision-making. The aim of empowering people is to shape their lives and create equal opportunities to everyone to improve their quality of lives. </P> 
------------- Fully Aligns the Paragraph.
 

<P Align="LEFT">Gyan was formed in 1994, with the involvement of a miscellany group of people comprising of academicians, grassroots practitioners, social scientists, media person and members of the judiciary. The organisation is registered as an autonomous body under the Society Registration Act of India. </P> ------------- the paragraph continues to remain default Left Aligned as before.
 

<P><U>Core Values</U></P>  ------------- the paragraph continues to remain default Left Aligned as before.

<P><B>Regional Offices</B></P>  ------------- the paragraph continues to remain default Left Aligned as before.

</BODY>

Time to save this file "gyan.html" and view it in the web browser say Netscape Navigator. On viewing you will find that the file you are creating is starting to resemble the sample webpage even in terms of Paragraph Alignment.

I am sure you would not be having any problem so far. If you have any problems till this point just shoot an email to us at knownet@knownetweaver.org and let us know about the difficulty you are facing. We would be glad to help you!!


Let us once again go over all the COMMANDS we have learnt.

    BOLD                    <B>       </B>

   ITALICS                 <I>         </I>

UNDERLINE              <U>       < /U>

  PARAGRAPH            <P>        </P>

     PARAGRAPH   (LEFT Align)         <P Align="LEFT">        </P>

     PARAGRAPH   (RIGHT Align)       <P Align="RIGHT">      </P>

     PARAGRAPH   (CENTER Align)     <P Align="CENTER">        </P>

       PARAGRAPH   (FULL  Align)         <P Align="JUSTIFY">   </P>



 

Now we will learn some more NEW commands.

THE "FONT" COMMAND

<FONT Face, Size, Color>     </FONT>




The FONT command is a very useful command to change the font type, size and color of the text being written in the BODY section of the webpage. There are three aspects of the FONT command : FONT FACE, FONT SIZE and FONT COLOR. We will learn about each of them one by one.

Save the file "Gyan.html" and view it in a web browser to see how close it looks to the Webpage of "Gyan."  I am sure it would be looking even closer to the original webpage.
Colours which can be reprentated by their Names or Hexadecimal Codes

BLACK=000000
RED=FF0000
BLUE=0000FF
GREEN=00FF00
PINK=FF8080
YELLOW=DBDB00
BROWN=804000

Colours which can be reprentated only through Hexadecimal Codes

PURPLE = 400080
LIGHT RED=FF6A6A
LIGHT BLUE=71B8FF
LIGHT GREEN=95FF95
LIGHT BROWN=FFA74F
LIGHT PURPLE=FF75FF
LIGHT GREY=C0C0C0
and hundreds of many more color types.....


Now we will learn some more NEW commands.

THE "FONT" COMMAND

<BR>

Break  <BR> is one of those exceptional commands which do not have an ending command. It function is just to give a LINE BREAK to start a sentence from the next line. Its function is similar to that of the "ENTER" key on the keyboard while working in a word-processing package.
 

Writing the <BR> code at the start of any text would start the same text from the next line when
viewed in a web viewer package.
 

Now if you notice in the sample webpage of GYAN,  the address portion for writing to  Gyan makes use of the BREAK  command because each address line starts from a new line.
 

Let us try using the BREAK command in the file you are working on.

Your file gyan.html will now read something like this:
 
 
<BODY> 

<FONT COLOR = "BLUE"><FONT SIZE=6><FONT FACE ="ARIAL">
<P align="CENTER"><B>GYAN</B></P> </FONT></FONT> </FONT> 
 

<FONT COLOR="RED"><FONT SIZE ="4"><FONT FACE ="ARIAL BLACK"><P Align ="RIGHT"><I>Local Self Governance through Knowledge Sharing </I></P> </FONT></FONT></FONT> 
 

<FONT COLOR="GREEN"><FONT SIZE ="3"><FONT FACE ="Helvetica">
<P Align="JUSTIFY">The overall mission of GYAN is to use the sword of knowledge-sharing to empower people by building capacities in them to understand local governance structures and helping them play an active and informed role in decision-making. The aim of empowering people is to shape their lives and create equal opportunities to everyone to improve their quality of lives. </P> </FONT></FONT></FONT> 
 

<FONT COLOR="BROWN"><FONT SIZE ="3"><FONT FACE ="ARIAL BLACK"><P Align="Justify">Gyan was formed in 1994, with the involvement of a miscellany group of people comprising of academicians, grassroots practitioners, social scientists, media person and members of the judiciary. The organisation is registered as an autonomous body under the Society Registration Act of India. </P></FONT></FONT></FONT> 
 

<P><U>Core Values</U></P>

<P><B>Regional Offices</B></P>
 

<P>To know more about our activities, you can write to us at :</P> -------- Changes this line into a Paragraph and inserts one BLANK LINE above and below it. 

Gyan 
<br>D- 147 Virtual Colony                  ---- Starts the address line from a new line.
<br>New Delhi                                      ---- Starts the address line from a new line.
<br>India                                               ---- Starts the address line from a new line.
<br>Phone +91 11 12345678            ---- Starts the address line from a new line.
<br>Fax +91 11 87654321                 ---- Starts the address line from a new line.
<br>email: gyan@gyan.org                 ---- Starts the address line from a new line.
<br>website : http://www.gyan.org      ---- Starts the address line from a new line.
 

</BODY>


 

You may like to save the file "gyan.html" and view it in the web browser to so whether the <BR> command is doing its job.
 


Now we will learn one more command before we finish this MODULE 2.
 


THE "LIST " COMMAND

<OL>  <UL>  <LI>

The list command is very useful in inserting BULLETS, Numbers or Alphabets to separate different lines. Lists could be Ordered Lists (UL)or Unordered Lists (OL).

Ordered Lists  are those which follow a sequence, say: 1, 2, 3, 4, 5... or a, b, c, d, e ..........   or i, ii, iii, iv, v .........  or I, II, III, IV, V......

Example of Ordered Lists are :

  1. Apple
  2. Orange
  3. Coconut
  4. Peach
  1. Apple
  2. Orange
  3. Coconut
  4. Peach
  1. Apple
  2. Orange
  3. Coconut
  4. Peach
  1. Apple
  2. Orange
  3. Coconut
  4. Peach
  1. Apple
  2. Orange
  3. Coconut
  4. Peach
Unordered Lists are those which do not follow a sequence and are merely bulleted by either disc, square or circle.

Example of Unordered List are:

CIRCLE TYPE

DISC TYPE SQUARE TYPE Now if you just look at the sample webpage of GYAN you will find that the five Core Values of Gyan form an Unordered List while the four regional offices of Gyan form an Ordered List.
 

To create an Unordered List (UL) we use the commands <UL TYPE = "........">, </UL> and <LI>, where ...... denotes either Square, Circle or a Disc. The default Unordered List type is  DISC.

<UL> marks the start of the Unordered List and </UL> marks the end of the Unordered List.

<LI> or Line Interval indicates the begining of the line where bullets have to be inserted.
 

Let us create the following unordered list:
 


 

The HTML codes for it would be:

<UL TYPE="DISC">
<LI>Apple
<LI>Orange
<LI>Coconut
<LI>Peach
</UL>
 

Let us try using the Unordered List Command to create the CORE VALUES portion of the sample webpage of GYAN.  Here you will notice that the bullets are in shape of SQUARE.
 

Your file gyan.html will now read something like this:
 
 
<BODY> 

<FONT COLOR = "BLUE"><FONT SIZE=6><FONT FACE ="ARIAL">
<P align="CENTER"><B>GYAN</B></P> </FONT></FONT></FONT> 
 

<FONT COLOR="RED"><FONT SIZE ="4"><FONT FACE ="ARIAL BLACK"><P Align ="RIGHT"><I>Local Self Governance through Knowledge Sharing </I></P> </FONT></FONT></FONT> 

<FONT COLOR="GREEN"><FONT SIZE ="3"><FONT FACE ="Helvetica">
<P Align="JUSTIFY">The overall mission of GYAN is to use the sword of knowledge-sharing to empower people by building capacities in them to understand local governance structures and helping them play an active and informed role in decision-making. The aim of empowering people is to shape their lives and create equal opportunities to everyone to improve their quality of lives. </P> </FONT></FONT></FONT> 
 

<FONT COLOR="BROWN"><FONT SIZE ="3"><FONT FACE ="ARIAL BLACK"><P Align="Justify">Gyan was formed in 1994, with the involvement of a miscellany group of people comprising of academicians, grassroots practitioners, social scientists, media person and members of the judiciary. The organisation is registered as an autonomous body under the Society Registration Act of India. </P></FONT></FONT></FONT> 
 

<P><U>Core Values</U></P>

<UL TYPE ="SQUARE">

<LI>Pursuit of vision as a  long term strategy.
<LI>Belief in democracy and non-violence.
<LI>Mainstreaming local people's involvement in all aspects of decision-making.
<LI>Inculcating gender equity and concerns in all actions.
<LI>Building, strengthening and replicating the knowledge revolution.

</UL>

<P><B>Regional Offices</B></P>
 

<P>To know more about our activities, you can write to us at :</P>

Gyan 
<br>D- 147 Virtual Colony 
<br>New Delhi 
<br>India 
<br>Phone +91 11 12345678 
<br>Fax +91 11 87654321 
<br>email: gyan@gyan.org 
<br>website : http://www.gyan.org 
 
 

</BODY>

Save the file "gyan.html" and view it in the web browser. Is the Unordered List showing up on viewing the webpage?
 

To create an Ordered List (OL)we use the commands <OL type = "........">, </OL> and <LI>,
where ...... denotes either 1, I, i, A or a.  The default Ordered List type is  1, 2, 3....
 

Let us create the following Ordered list:
1. Apple
2. Orange
3. Coconut
4. Peach

The HTML codes for it would be:

<OL TYPE="1">
<LI>Apple
<LI>Orange
<LI>Coconut
<LI>Peach
</OL>
 

Let us try using the Ordered List Command to create the CONTACT OFICES  portion of the sample webpage of GYAN.  You will notice that the ordered list is of the type i, ii, iii, iv........
 

Your file gyan.html will now read something like this:
 
 
<BODY> 

<FONT COLOR = "BLUE"><FONT SIZE=6><FONT FACE ="ARIAL">
<P align="CENTER"><B>GYAN</B></P> </FONT></FONT></FONT> 
 

<FONT COLOR="RED"><FONT SIZE ="4"><FONT FACE ="ARIAL BLACK"><P Align ="RIGHT"><I>Local Self Governance through Knowledge Sharing </I></P> </FONT></FONT></FONT> 

<FONT COLOR="GREEN"><FONT SIZE ="3"><FONT FACE ="Helvetica">
<P Align="JUSTIFY">The overall mission of GYAN is to use the sword of knowledge-sharing to empower people by building capacities in them to understand local governance structures and helping them play an active and informed role in decision-making. The aim of empowering people is to shape their lives and create equal opportunities to everyone to improve their quality of lives. </P> </FONT></FONT></FONT> 
 

<FONT COLOR="BROWN"><FONT SIZE ="3"><FONT FACE ="ARIAL BLACK"><P Align="Justify">Gyan was formed in 1994, with the involvement of a miscellany group of people comprising of academicians, grassroots practitioners, social scientists, media person and members of the judiciary. The organisation is registered as an autonomous body under the Society Registration Act of India. </P></FONT></FONT></FONT> 
 

<P><U>Core Values</U></P>

<UL TYPE ="SQUARE">

<LI>Pursuit of vision as a  long term strategy.
<LI>Belief in democracy and non-violence.
<LI>Mainstreaming local people's involvement in all aspects of decision-making.
<LI>Inculcating gender equity and concerns in all actions.
<LI>Building, Strengthening and Replicating the knowledge revolution.

</UL>

<P>Regional Offices</P>  ----------- Creates a new Paragraph

<P>The main office of Gyan is in New Delhi. There are four regional offices of Gyan in India. These are at:

<OL TYPE ="i">
<LI>Jaipur
<LI>Bhopal
<LI>Hyderabad
<LI>Bangalore

</OL>
 

<P>To know more about our activities, you can write to us at :</P>

Gyan 
<br>D- 147 Virtual Colony 
<br>New Delhi 
<br>India 
<br>Phone +91 11 12345678 
<br>Fax +91 11 87654321 
<br>email: gyan@gyan.org 
<br>website : http://www.gyan.org 
 

</BODY>

There is nothing more to learn now in this MODULE!!

THE TIME HAS COME TO SAVE YOUR FILE ONCE AGAIN !!

See for yourself whether your file "gyan.html" fully resembles the < href="manual2.html#image">sample webpage!!
If so, you have mastered 75% of the Web designing.

Even if it does not resemble the sample webpage, don' t worry - just write us an email at knownet@knownetweaver.org to let us know the problem you are facing and we will get back to you.

End of Module 2


Go to Module 3
Go to Module 4


Go back to Module 1

                      Do let us know of your feedback at knownet@knownetweaver.org

                                  TechKnow is designed by Vikas Nath with grateful inputs from Pankaj Acharya. TechKnow is a part of the series of resources being developed under the KnowNet Initiative.

Sign Guestbook   View Guestbook

Copyright © 2000 KnowNet Initiative¨.