Upcoming SlideShare
×

# Unit 2.6

335 views

Published on

Published in: Technology, Design
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
335
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
3
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Unit 2.6

1. 1. Programming and Development Tools Web Programming UNIT 2.6Web ProgrammingLink OBJECTIVES This unit helps you to link various Web pages of a Web site using Hyperlinks. At the end of this unit, you will be able to Identify a link in a Web page. Differentiate Internal and External Hyperlinks. Open a Web page in a new Window. Change the colour of different states of a link.Benchmark standard Organize the Web site by creating links between the Web pages of a Web site successfully.Link 2.6-1
3. 3. Programming and Development Tools Web Programming Internal Hyperlinks<UL Type="disc"><LI><A Href="#Tomatoes">8 Tomatoes </A><LI><A Href="#Coins">6 Coins </A> Internal Hyperlinks</UL><LI>Puzzles related to Maths<UL Type="disc"><LI><A Href="#Green">Green coloured cubes </A><LI><A Href="#Multi">Multiplication and Addition </A></UL> Internal Hyperlinks<LI>Puzzles related to logical thinking<UL Type=disc><LI><A Href="#Triplet">Triplet Brothers </A><LI><A Href="#Brother">Who is younger? </A><LI><A Href="#Share">Share it equally </A></UL></OL><H2> Puzzles related to weight </H2><A Name="Tomatoes"><H3>8 Tomatoes</H3>There are 8 identical tomatoes supplied to you. One ofthe tomatoes is lighter than all the other tomatoes. Youare given a balance to weigh. Find the lightest tomato byweighing it 2 times only.<A Name="Coins"><H3>6 Coins</H3>You have 6 coins of which one is heavier. Weigh them 2times using a common balance and pull the odd one out,<A Name="Green"><H2> Puzzles related to Maths </H2><H3>Green Cubes</H3>Paint a cube of side 4 cm with Green colour. Cut the cubeinto 64 one cm small cubes. <BR>How many cubes have?<OL>Link 2.6-3
5. 5. Programming and Development Tools Web ProgrammingThe code in Answers.html is given below:<HTML><HEAD><TITLE> Answers </TITLE><BODY><H1 Align=Center> Answers to the puzzles </H1><H2> 8 Tomatoes </H2>Take 3 Tomatoes in each pan. There are 2 possibilities.<OL><LI>If there is no difference in weight, take the other 2tomatoes and put one in each pan. The one with lesserweight is the lightest of all.<LI>If there is difference, remove the tomatoes from theheavier side. Take the other 3 tomatoes and put 1 in eachpan and keep one outside. If there is no difference thetomato that is kept outside is the lightest. If there isdifference the lightest tomato is easily identified fromthe weighing.</OL><H2> 6 Coins </H2>Take 3 coins in each pan. Remove the coins from thelighter side. Take the 3 coins from the heavier side andput 1 in each pan and keep one outside. If there is nodifference the coin that is kept outside is the heaviest.If there is difference the heaviest coin is easilyidentified from the weighing.<H2> Green Cubes </H2><OL><LI> No colour on any side - 8 cubes<LI> Green colour on one side - 24 cubes<LI> Green colour on two sides - 24 cubes<LI> Green colour on three sides - 8 cubes</OL><H2> Multiplication and Addition </H2>A=1 &nbsp; B=7 &nbsp; C=4 &nbsp; D=6 &nbsp; E=8 &nbsp;F=2 &nbsp; G=5 &nbsp; H=9 &nbsp; I=3<H2> Triplet Brothers </H2>Left=Robert &nbsp; Middle=Robin &nbsp;Right=RogerLink 2.6-5
6. 6. Programming and Development Tools Web Programming<H2> Who is younger? </H2>Sister<H2> Share it equally </H2>The steps to be followed are: <BR><OL><LI> Pour water from 24 litre jug to 13 litre jug.<LI> Pour water from 13 litre jug to 5 litre jug.<LI> Pour water from 13 litre jug to 11 litre jug.<LI> Pour water from 5 litre jug to 13 litre jug.<LI> Pour water from 24 litre jug to 13 litre jug.<LI> Pour water from 13 litre jug to 5 litre jug.<LI> Pour water from 5 litre jug to 24 litre jug.</OL></BODY></HTML> Code Sample 2.6.2The Web page shown in Figure 2.6.1 is displayed in the browser window.Link 2.6-6