Ukindia
Learn HTML Lesson 3


Jalfrezi Html lessons..Lesson 2 .. Home Page..Learn to read Hindi..Write to us if you find this lesson useful
Frames

These are slow to load and should be used carefully.

Say you wanted to see the ukindia science page (asci.htm) in the top half of the page and the medical one (amed.htm) in the bottom half . You would write the tag for frames as follows . Note from now on we will use ( ) instead of the angled bracket tags you see below outlining the words 'table border=10' in this figure or the words TR and TD as otherwise the computer doesnt print anything within the angled brackets but goes off to do the command .

(FRAMESET ROWS="50%,50%") (FRAME SRC="asci.htm") (FRAME SRC="amed.htm") (/FRAMESET)

The 50%, 50% above means that the top row should e 50% and the bottom 50% of the total page.

u Just open a new html document and write the above words there with the angled instead of the curved brackets and then save it as say ab.htm file . Download ukindia scienceand ukindia med files in the same directory and open your ab.htm using your browser and you should get a result like this sci/med rows


If you wanted to have two columns so that you can read the two files side by side you would type below -again remember to use angled brackets instead of curved ones like these below . Its not necessary to use capitals

(FRAMESET COLS="50%,50%") (FRAME SRC="asci.htm") (FRAME SRC="amed.htm")(/frameset)

and you should see a document like so sci/med columns


Remember you can use your mouse to resize the columns.
You can nest frames within each other. For example the following will put a two col frame in the top row of two rows. (FRAMESET ROWS="50%,50%")(FRAMESET COLS="50%,50%") (FRAME SRC="asci.htm") (FRAME SRC="amed.htm") (FRAME SRC="asci.htm")(/frameset)

Your result should be as follows Tow cols/one row

The first command
(FRAMESET ROWS="50%,50%")
tells your browser that there are two rows of equal 50% size.

The next command
(FRAMESET COLS="50%,50%") tells it the details of the first row ie it itself has two columns
The next two commands
(FRAME SRC="asci.htm") (FRAME SRC="amed.htm")
tells it that the first col has the file asci.htm and the second col the file amed.htm

The final statement
(FRAME SRC="asci.htm")
says to put asci.htm in the bottom row.


Image Maps

Here the picture is divided into different areas and clicking on one area takes you to a different file .