EX.

NO: 1 DATE:

FLOW LAYOUT

AIM: To write a java program for implementing flowlayout concept.

ALGORITHM:

1. Start the program. 2. Import the various packages like-awt. * and applet. * 3. Include the comment statement <applet> which contains code = ”classname.class” and the height and width for the applet window. 4. Inside the class, use the method void init () 5. Create objects for FlowLayout, Label, TextField and Button. 6. Add all the components to the layout using add () method. 7. Compile the code 8. View it using Applet Viewer. 9. Stop the program.

1

PROGRAM: // program to demonstrate the flow layout import java.awt.*; import java.applet.*; /*<applet code="flowlayout" height=300 width=300> </applet>*/ public class flowlayout extends Applet { public void init() { FlowLayout f1=new FlowLayout(FlowLayout.LEFT); setLayout(f1); Label l1=new Label("User Name"); add(l1); TextField t1=new TextField("Enter the E- Mail ID"); add(t1); Label l2=new Label("User Password"); add(l2); TextField t2=new TextField("Enter Password"); add(t2); t2.setEchoChar('*'); Button b=new Button("Sign In"); add(b); } }

2

OUTPUT: Z:\>javac flowlayout.java Z:\>appletviewer flowlayout.java

RESULT: Thus the program has been executed successfully.

3

Include the comment statement <applet> which contains code=”classname. 8. 4.class” and the height and width for the applet window. Stop the program. Import the various packages like-awt.NO: 2 DATE: BORDER LAYOUT AIM: To write a java program for implementing border layout concept. Compile the code and view it using AppletViewer. 2. Add the components using add() method 7. Start the program.* and applet. 4 . ALGORITHM: 1.EX. Create objects for BorderLayout and Button 6. Inside the class use the method void init() 5.* 3.

applet. add(b4. add(ta. Button b2=new Button("Stop"). add(b2.setBackground(Color. add(b3. } } 5 .NORTH).BorderLayout. Button b1=new Button("Play").*. ta.PROGRAM: //program to demonstrate the border layout import java. add(b1.BorderLayout.10).WEST).white). setBackground(Color.BorderLayout.*. setLayout(b).SOUTH).awt.CENTER). Button b3=new Button("Clip").20).BorderLayout. import java.EAST).white). /*<applet code=borderlayout height=300 width=300> </applet>*/ public class borderlayout extends Applet { public void init() { BorderLayout b=new BorderLayout(10.BorderLayout. Button b4=new Button("Edit"). TextArea ta=new TextArea(20.

java RESULT: Thus the program has been executed successfully. 6 .OUTPUT: Z:\>javac borderlayout.java Z:\>appletviewer borderlayout.

PROGRAM: 7 .* 3. 8.NO: 3 DATE: GRID LAYOUT AIM: To write a java program for implementing grid layout concept. Create objects for GridLayout.Button . 6. ALGORITHM: 1. 2. Import the various packages like-awt. 4. Compile the code and view it using Applet Viewer. Start the program.EX. Include the comment statement <applet> which contains code=”classname. Add the components to the Applet 7. Inside the class use the method void init() 5. Stop the program.* and applet.class” and the height and width for the applet window.

4.*.applet.i++) { add(new Button(""+i)). for(int i=0. setLayout(g).i<12. /*<applet code=gridlayout height=300 width=300> </applet>*/ public class gridlayout extends Applet { public void init() { GridLayout g=new GridLayout(3. } } } OUTPUT: 8 . import java.*.2).//program to demonstrate the grid layout import java. Button b[].2.awt.

Z:\>javac gridlayout.java Z:\>appletviewer gridlayout.java RESULT: Thus the program has been executed successfully. EX.NO: 4 9 .

Create objects for GridBagLayout. 2. 9. Compile the code and view it using AppletViewer.class” and the height and width for the applet window.GridBagConstraints. 8. 6. Include the comment statement <applet> which contains code=”classname.* 3. Add all the components using add() method.* and applet. 4. Import the various packages like-awt.DATE: GRIDBAG LAYOUT AIM: To write a java program for implementing gridbag layout concept. PROGRAM: 10 . Inside the class use the method void init() 5. ALGORITHM: 1. Stop the program. Start the program.buttons. 7.Label. Set the coordinates using gridx and gridy and SetConstraints.

gridy=3. gc. Label l2=new Label("Goa").gc). gb.gridy=2.fill=GridBagConstraints. gb. add(l). GridBagConstraints gc=new GridBagConstraints().gridy=3.gc). add(l1). Label l1=new Label("Tamil Nadu").gridx=0.gridx=1.gc). /*<applet code=gridbag height=300 width=300> </applet>*/ public class gridbag extends Applet { public void init() { GridBagLayout gb =new GridBagLayout().setConstraints(l1. gb.setConstraints(l2. gb. gc.gridy=2.setConstraints(l.awt.// program to demonstrate the gridbag layout import java. Button b1=new Button("Chennai").*.java 11 . Label l=new Label("States and Capitals"). gc. add(b1).setConstraints(b2.gc).gridx=0. gc. gc. add(l2). } } OUTPUT: Z:\>javac gridbag.*. gc. import java. gc.gridx=1. setLayout(gb).BOTH. gb.setConstraints(b1. Button b2=new Button("Panaji").gc).applet. gc. gc. add(b2).

Z:\>appletviewer gridbag.java RESULT: Thus the program has been executed successfully.NO: 5 DATE: 12 . EX.

Inside the class use the method void init() 5. Import the various packages like-awt. 9. Add the panel to the applet using add() 8. ALGORITHM: 1. Create objects for CardLayout.CARD LAYOUT AIM: To write a java program for implementing card layout concept. Start the program. 7.Checkbox and Button.class” and the height and width for the applet window. 2. PROGRAM: //program to demonstrate the card layout 13 .Label 6. Stop the program. Add all the components to the panel add() method.Panel. 4.* 3.TextField.* and applet. Include the comment statement <applet> which contains code=”classname. Compile the code and view it using an AppletViewer.

add(a). t2.add(b). Label l1=new Label("User Name"). Panel p1=new Panel(). p1. p2. p1.awt. p1. p1.setEchoChar('#'). add(p1). p1.*. /*<applet code=cardlayout height=300 width=300> </applet>*/ public class cardlayout extends Applet { public void init() { CardLayout c=new CardLayout(20.java 14 . TextField t2=new TextField(10). } } OUTPUT: Z:\>javac cardlayout.add(l1).add(t1).add(l2).import java.applet.30). import java. Panel p2=new Panel().add(t2). add(p2). Checkbox a=new Checkbox("New User"). Button b=new Button("Submit").*. TextField t1=new TextField(10). Label l2=new Label("User Password").

java RESULT: Thus the program has been executed successfully.Z:\>appletviewer cardlayout.NO: 6 DATE: 15 . EX.

4. Scrollbars using AWT controls in Java Applets. 6. PROGRAM: //To demonstrate the listbox and scrollbars AWT controls 16 . 5. ALGORITHM: 1. 3. Create the Scrolls bars VERTICAL. Add the item to the choice using addItem() method. 2. 7. Add the Choice and Scrollsbars to the Applet window. Stop the program. HORIZONTAL by specifying in the parameters of the Scrollbars class.AWT CONTROLS-Choice. Create the Choice object using the Choice class. Scrollbars AIM: To demonstrate the Choice. Compile the code. View it using Applet Viewer.

import java.awt.*; import java.awt.event .*; import java.applet.*; /*<applet code=choicelist height=500 width=500> </applet>*/ public class choicelist extends Applet { Scrollbar red,blue,green; { Choice ch=new Choice(); ch.addItem("HTML"); ch.addItem("Oracle"); ch.addItem("Java"); ch.addItemListener(new ch1()); add(ch); } public void init() { List l; Color c=getBackground(); red=new Scrollbar(Scrollbar.HORIZONTAL,c.getRed(),0,0,255); blue=new Scrollbar(Scrollbar.HORIZONTAL,c.getBlue(),0,0,255); green=new Scrollbar(Scrollbar.VERTICAL,c.getGreen(),0,0,255); red.addAdjustmentListener(new sc()); add(red); blue.addAdjustmentListener(new sc()); add(blue); green.addAdjustmentListener(new sc()); add(green); l=new List(); l.add("CSE"); l.add("ECE"); l.add("EEE"); add(l); l.addActionListener(new sri()); } class sri implements ActionListener { public void actionPerformed(ActionEvent e) { showStatus("You have selected "+e.getActionCommand()+" in SREC"); } } class sc implements AdjustmentListener { public void adjustmentValueChanged(AdjustmentEvent e) { int r=red.getValue();

17

int g=green.getValue(); int b=blue.getValue(); Color c=new Color(r,g,b); setBackground(c); repaint(); } } class ch1 implements ItemListener { public void itemStateChanged(ItemEvent e) { String s=(String)e.getItem(); showStatus("you have selected "+s+" module"); } } }

OUTPUT: Z:\>javac choicelist.java

18

Z:\>appletviewer choicelist.java

RESULT: Thus the program has been executed successfully.

EX.NO: 7 DATE:

19

Compile the code. Create the Option button using the CheckboxGroup and Checkbox class. View it using Applet Viewer. Stop the program. PROGRAM: //To demonstrate the checkbox. Option buttons using AWT controls in Java Applets. 3.AWT CONTROLS-CHECKBOX. 6. option button AWT control 20 . 4. ALGORITHM: 1. 2. Add the Checkbox and Optionbutton to the Applet window. 5. Create the Checkbox using the Checkbox class. OPTION BUTTONS AIM: To demonstrate the Checkbox.

c1=new Checkbox("DOS & Windows".applet. add(c1).awt. add(c2).cbg. cbg=new CheckboxGroup().event .*.cbg. true). { a. /*<applet code=checkbox height=500 width=500> </applet>*/ public class checkbox extends Applet { Checkbox a. import java. add(c3).false). } } class a1 extends MouseAdapter { public void mouseClicked(MouseEvent e) { showStatus("you has selected hardware"). add(a).addMouseListener(new cc2()). c2=new Checkbox("MS office". c2. false). false). c3=new Checkbox("VB".addMouseListener(new b1()).false). } } class b1 extends MouseAdapter { public void mouseClicked(MouseEvent e) { 21 .*. Checkbox b. Checkbox c2. c3.addMouseListener(new cc1()). CheckboxGroup cbg.cbg. public void init() { a=new Checkbox("hardware".awt. b. import java. Checkbox c3. add(b). b=new Checkbox("software". c1.*.addMouseListener(new cc3()). Checkbox c1.import java.addMouseListener(new a1()).

} } class cc2 extends MouseAdapter { public void mouseClicked(MouseEvent e) { showStatus("you has selected MS office"). } } } 22 . } } class cc3 extends MouseAdapter { public void mouseClicked(MouseEvent e) { showStatus("you has selected VB").showStatus("you has selected software"). } } class cc1 extends MouseAdapter { public void mouseClicked(MouseEvent e) { showStatus("you has selected DOS & Windows").

java Z:\>appletviewer checkbox.java RESULT: Thus the program has been executed successfully.OUTPUT: Z:\>javac checkbox. 23 .

Create the Array of Buttons Using the Button class 3. 8. Add the TextArea to the Applet window 6. Create the TextArea Controls using the TextArea class 2. View it using Applet Viewer. Compile the code 7. with the object of the color class as its parameter 5. Stop the program. Using the setForeground() and setBackground() method modify the Foreground and Background color of the TextArea. PROGRAM: 24 . Using the ActionListener event handler fire the event for the Button Control 4.NO: 8 DATE: COLOR PALETTE AIM: To demonstrate the Text Formatting options of AWT controls in Java Applets ALGORITHM: 1.EX.

addActionListener(this).blue.event. import java.Color.//Program to demonstrate the Matrix of Colors import java. p1.getState()) 25 .Color. b[i]. p1. p1.pink. } cb=new Checkbox("Back Ground Color".Color.length. public void init() { setLayout(new BorderLayout()). import java.io. b[i].gray.Color.true).awt.i++) { b[i]=new Button(" ").magenta.cb. } public void actionPerformed(ActionEvent e) { if(cb.black. a=new TextArea(" ").green.applet.add(b[i]).setVisible(true).Color. for(int i=0. /*<applet code=palette height=300 width=300> </applet>*/ public class palette extends Applet implements ActionListener { Checkbox cf.true).Colo r.red.i<color.Color.lightGray.orange}.*.*.add(cb).Color.awt. p1. Button b[].Color. add(p1.*.Color. private Color color[]={Color.Color.BorderLayout. cf=new Checkbox("Fore Ground Color".SOUTH). p1=new Panel().*.yellow. add(a. import java.white.Color. b=new Button[13].CENTER).darkGray.setBackground(color[i]).cyan.BorderLayout. TextArea a. Panel p1.add(cf).

getState()) { for(int i=0.i++) { if(e.getSource()==b[i]) a.getSource()==b[i]) a. } } } } OUTPUT: 26 .i<color.length.length.setForeground(color[i]).{ for(int i=0.setBackground(color[i]).i++) { if(e. } } if(cf.i<color.

java Z:\>appletviewer palette.java RESULT: Thus the program has been executed successfully.Z:\>javac palette.NO: 9 27 . EX.

getLastModified(). 2. openConnetion() is a method in the URL class and its used to open a connection between the communicating parites 4. 3. getContentLength() are accessed using the URLConnection class object. 28 . openStream() method is used to get the input stream from the web page.DATE: URL AIM: To write a JAVA program to Set the URL of another server. getExpires(). Using FileOutputStream.html file 6. Download the homepage of the server and Display the contents of the page. the methods such as getDate(). we put the web page contents into a . We use two classes called URL and URLConnection. ALGORITHM: 1. 5. The URL class is used to set the URL of another server. Then.

System.getContentType()).getInputStream().openConnection(). while(((c=input.*.io. URL hp=new URL("http://www. } input.println("====Content====").println("Last-Modified:"+new Date(hpCon. } } } 29 .com"). } else { System. import java.println("Expires:"+hpCon.getLastModified())). if(len>0) { System.println("Content type:"+hpCon.out.out. InputStream input=hpCon. System. import java.println("Date:"+new Date(hpCon.getContentLength(). System.println("Content-Length:"+len).util. import java.PROGRAM: //To demonstrate the URL concept of Java.google. URLConnection hpCon=hp. class url { public static void main(String args[]) throws Exception { int c.*. int i=len.getContentType()).Date.out.out.println((char-) c).println("No content available").out.out.close().getDate())).out. System. int len=hpCon.read())!=-1)&&(--i>0)) { System.net. System.out.

OUTPUT: Z:\>javac url. 30 .java Z:\>java url Date:Thu Jan 01 05:30:00 GMT+05:30 2004 Content-Type:null Expires:null Last-Modified:Thu Jan 01 05:30:00 GMT+05:30 2004 Content-Length:-1 No content available RESULT: Thus the program has been executed successfully.

7.Create a BufferedReader stream for getting keyboard input. & java. Recieve the DatagramPacket from the client using the receive( ) method.EX.Stop the program.Declare & initialize byte arrays to act as send & receive buffer. Send the message to client using the DatagramSocket send() method.for sending & receiving messages.NO: 10 DATE: CHATTING AIM: To write a java program for implementing chatting concept by server side. 6. i) ii) iii) iv) Build a DatagramPacket for the message to be sent. 3.Create a class ‘client’.Start the program.io.Create DatagramPacket for sending & receiving packets using respective buffers.Create a DatagramSocket at the specified port .Import the packages java. 8.net. 2. Display the message. 4. 5. 9. ALGORITHM: CLIENT: 1.Repeat the following steps till message “bye” is recieved. 31 .

Repeat the following steps till message “bye” is recieved.Declare & initialize byte arrays to act as send & receive buffer. 3. 6. 8.for sending & receiving messages.net. 5. ii) Display the message. 9. Stop the program.Start the program. 7. iii) Build a DatagramPacket for the message to be sent. & java. 32 .Create DatagramPacket for sending & receiving packets using respective buffers. 2.Create a BufferedReader stream for getting keyboard input.SERVER : 1. Import the packages java.Create a class ‘server’.io. i) Recieve the DatagramPacket from the client using the receive( ) method. 4. iv) Send the message to client using the DatagramSocket send() method.Create a DatagramSocket at the specified port .

datapacket=new DatagramPacket(buff.PROGRAM: //Client Side Program import java.in). datasocket=new DatagramSocket(1313).*.net.*.1024).buff.getData()).net.io. buff=s2. 33 . for(.getBytes(). System.length.getAddress(). DatagramPacket datapacket. DatagramSocket datasocket. datasocket. String s2. import java. byte []buff.*. import java. DatagramSocket datasocket. } } } //Server Side Program import java.io.println("Client:\n"+str). public class client { public static void main(String s[])throws Exception { DataInputStream d=new DataInputStream(System.datapacket.getPort()). import java. datasocket.out.out.*.*.util.) { datapacket=new DatagramPacket(new byte[1024].receive(datapacket).*. System. String str=new String(datapacket.send(datapacket). import java.readLine().util. s2=d.datapacket.println("Server:\n").. public class server { public static void main(String s[])throws Exception { DataInputStream d=new DataInputStream(System.in).

System.receive(datapacket). datapacket=new DatagramPacket(buff.java Z:\>java server Client: hai Server: how are you? Client: stop Client Z:\>javac client.getAddress().out. for(.println("Client:\n"+str).datapacket.datapacket.getData()).getPort()). datasocket. System.println("Server:\n").java Z:\>java client RESULT: Thus the program for chatting has been executed successfully 34 .DatagramPacket datapacket.buff. datasocket.send(datapacket).length. String str=new String(datapacket.getBytes(). String s2. } } } OUTPUT: Server Z:\>javac server. s2=d. byte []buff..) { datapacket=new DatagramPacket(new byte[1024].readLine().out.1024). buff=s2. datasocket=new DatagramSocket(1313).

The doGet() method need to be coded to receive information from the browser.0.EX. Identify the method to be used. Deploy the servlet. A class name odbc that extends from HttpServlet class name needs to be coded 2. whenever a client browser makes a request for the HTML page. then execute the servlet. Identify the classes to be used.0. 4. Odbc  Name of the web content for this application name PROGRAM:  Address of the host  is the port number through which the J2SP server 35 .0. 3. ALGORITHM: 1. Generate the source and compile it.1:8080/java/odbc 127. *Open the browser and type http://127.1 8080 accept the request.NO: 11 DATE: SERVLETS AIM : To write a program in JAVA to demonstrate the servlet.0.

} catch(SQLException e2) 36 . pw.util.servlet. import java.io.println("<td align=center>").println("<body><table cellpadding=2 cellspacing=2 border=1><th>no</th><th>name</th>").*.*.getInt(1)). no=Integer. while(rs. } pw. } try { cn=DriverManager.getString(2)). public class odbc extends HttpServlet { PrintWriter pw. st=cn. pw. import javax. import javax. pw=res. res.forName("sun.trim()). pw.http.IOException { int no."".executeQuery("select * from MARKLIST where regno="+no).HttpServletResponse res) throws ServletException.setContentType("text.println("<tr>").servlet.jdbc. pw. } catch(ClassNotFoundException e) { System. rs=st."").println("</table></body></html>"). ResultSet rs.odbc.println("<html><title>JDBC</title>").getConnection("Jdbc:Odbc:ex10".next()) { pw. Statement st.println("</td>").println(rs. import java.sql.*.//To demonstrate servlet concept import java.getParameter("t1"). public void doGet(HttpServletRequest req.JdbcOdbcDriver"). Connection cn.println("<td align=center>"). pw.getwriter().println(rs.*. pw.parseInt(req.println(e). try { Class.createStatement().html"). pw.*.out.

out.println(e2). EX.NO: 12 37 .{ System. } } } OUTPUT: RESULT: Thus the program has been executed successfully.

Font Type. Add the TextArea to the Applet window 5. Using the ItemListener event handler fire the event for the Choice Control 3.Choice Controls using the TextArea . Create the TextArea. Compile the code 6. PROGRAM: 38 . View it using Applet Viewer.Choice class respectively 2. 4. 7.DATE: 30-08-07 TEXT FORMATTING AIM: To demonstrate the Text Formatting options of AWT controls in Java Applets ALGORITHM: 1. Stop the program. Using the Font class modify the Font . Font Size.

Choice cs=new Choice().getItem()==fontsname[i]) 39 .*. ct.*. TextArea ta. } add(cf).event.addItemListener(new stylemenu())."BoldItalic".addItem(size[i]). /*<applet code=textformat."Helvetica"}. cs.length. } class fontmenu implements ItemListener { public void itemStateChanged(ItemEvent e) { for(int i=0."18"."Courier". import java. private int typename[]={1.i++) { cf."Plain"}."12". for(int i=0. Choice cf=new Choice(). add(ct).addItem(type[i]).//To Demonstrate the Text Formatting such as Font face.120.addItemListener(new fontmenu()). private String fontsname[]={"TimesRoman".awt. Choice ct=new Choice().addItem(fontsname[i]). import java. private String type[]={"Bold".i<3."20". import java.i<fontsname. add(ta).2.util. public menu() { FlowLayout f1=new FlowLayout(). cs. add(cs).class width=500 height=500></applet>*/ public class menu extends Applet { String d. setLayout(f1). type import java. i++) { if((String)e. ta=new TextArea(" ".*. private String size[]={"10"."Italic".3."15".*.80).awt. size.*. import java. ct. cf.0}.addItemListener(new sizemenu())."25"}.applet.io.

PLAIN.PLAIN. } } } } class sizemenu implements ItemListener { public void itemStateChanged(ItemEvent e) { for(int i=0.getItem()==type[i]) { ta. i++) { if((String)e.Integer.Font.i<type. break.typename[i]. break.Font.length.setFont(new Font(d. } } } } } 40 . } } } } class stylemenu implements ItemListener { public void itemStateChanged(ItemEvent e) { for(int i=0.{ d=fontsname[i].setFont(new Font(d. break.i<size. ta.getItem()==size[i]) { ta.12)). i++) { if((String)e.setFont(new Font(fontsname[i].length.12)).parseInt(size[i]))).

41 .java Z:\>appletviewer textformat.java RESULT: Thus the program has been executed successfully.OUTPUT: Z:\>javac textformat.

Set an interlink to visit the home page 42 .NO: 13 DATE: 06-09-07 COLLEGE INFORMATION AIM: To write a program in HTML to publish the college information ALGORITHM : 1. Create a home page for the college details 2. By clicking over the departments move to another page 4.EX. In that give various information about the college (Department Details) 3.

&nbsp. &nbsp.CHEMICAL</H4></A> <br><br><br><br><br><br><br><br><br><br><br><br> <A NAME="CS"><H3 ALIGN=CENTER><BR><B><U>COMPUTER SCIENCE AND ENGINEERING</U></B></H3></A> <BR>STAFF MEMBERS &nbsp. : 98 <BR><BR><BR><BR> <a href="#home"><Center>CLICK HERE TO HOME</Center></A> <br><br><br><br><br><br><br><br><br><br><br><br> <A NAME="IT"><h3 align=center><b><u>INFORMATION TECHNOLOGY</u></b></center></h3></A><BR> <BR>STAFF MEMBERS &nbsp.PROGRAM: //Program for showing the college information.<BR>THIRUVALLUR TK & Dt-602 024. : 65 <BR>THIRD YEAR &nbsp.ELECTRICAL AND ELECTRONICS</H4></A> <A HREF="#MECH"><H4>5. &nbsp. &nbsp. &nbsp. : 60 <BR>SECOND YEAR &nbsp. &nbsp. : 70 <BR>THIRD YEAR &nbsp. : 80 <BR>FOURTH YEAR &nbsp. &nbsp.S.ELECTRONICS AND COMMUNICATION</H4></A> <A HREF="#EE"><H4>4.<BR>(NEAR CHENNAI)</H3></CENTER> <h3>COURSES OFFERED <A HREF="#CS"><H4>1. : 50 <BR>SECOND YEAR &nbsp.AUTOMOBILE</H4></A> <A HREF="#CHE"><H4>7.MECHANICAL</H4></A> <A HREF="#AUTO"><H4>6. &nbsp. : 8 <BR><BR><U>STUDENTS STRENGTH</U> <BR><BR>FIRST YEAR&nbsp.INFORMATION TECHNOLOGY</H4></A> <A HREF="#EC"><H4>3.VEPPAMPATTU R. : 70 <BR>FOURTH YEAR &nbsp. &nbsp.COMPUTER SCIENCE</H4></A> <A HREF="#IT"><H4>2. : 90 <BR><BR><BR><BR> <a href="#home"><center>CLICK HERE TO HOME</center></A> <br><br><br><br><br><br><br><br><br><br><br><br> <A NAME="EC"><h3 align=center><b><u>ELECTRONICS AND 43 . : 8 <BR><BR><U>STUDENTS STRENGTH</U> <BR><BR>FIRST YEAR&nbsp. &nbsp. <html> <head> <title>COLLEGE INFORMATION</title> </head> <body bgcolor=yellow> <A NAME="HOME"></A> <h1 align=center><u>SRI RAM ENGINEERING COLLEGE</u></h1> <CENTER><H3>PERUMALPATTU VILLAGE.

: 100 <BR>THIRD YEAR &nbsp. &nbsp. &nbsp. &nbsp. &nbsp. &nbsp. : 55 <BR>FOURTH YEAR &nbsp. &nbsp. : 60 <BR><BR><BR><BR> <a href="#home"><Center>CLICK HERE TO HOME</Center></A> <br><br><br><br><br><br><br><br><br><br><br><br> <A NAME="MECH"><h3 align=center><b><u>MECHANICAL</u></b></h3></A><BR> <BR>STAFF MEMBERS &nbsp. &nbsp. : 9 <BR><BR><U>STUDENTS STRENGTH</U> <BR><BR>FIRST YEAR&nbsp. &nbsp.COMMUNICATION</u></b></h3></A><BR> <BR>STAFF MEMBERS &nbsp. : 60 <BR>THIRD YEAR &nbsp. : 110 <BR>FOURTH YEAR &nbsp. : 60 <BR><BR><BR><BR> <a href="#home"><Center>CLICK HERE TO HOME</Center></A> <br><br><br><br><br><br><br><br><br><br><br><br> <A NAME="CHE"><h3 align=center><b><u>CHEMICAL</u></b></h3></A><BR> <BR>STAFF MEMBERS &nbsp. : 15 <BR><BR><U>STUDENTS STRENGTH</U> <BR><BR>FIRST YEAR&nbsp. &nbsp. &nbsp. : 8 <BR><BR><U>STUDENTS STRENGTH</U> <BR><BR>FIRST YEAR&nbsp. : 60 <BR>FOURTH YEAR &nbsp. : 10 <BR><BR><U>STUDENTS STRENGTH</U> <BR><BR>FIRST YEAR&nbsp. : 35 <BR>SECOND YEAR &nbsp. &nbsp. : 60 <BR>FOURTH YEAR &nbsp. &nbsp. : 40 44 . : 58 <BR>THIRD YEAR &nbsp. : 60 <BR><BR><BR><BR> <a href="#home"><Center>CLICK HERE TO HOME</Center></A> <br><br><br><br><br><br><br><br><br><br><br><br> <A NAME="AUTO"><h3 align=center><b><u>AUTOMOBLE</u></b></h3></A><BR> <BR>STAFF MEMBERS &nbsp. &nbsp. &nbsp. : 120 <BR><BR><BR><BR> <a href="#home"><center>CLICK HERE TO HOME</center></A> <BR><br><br><br><br><br><br><br><br><br><br><br><br> <A NAME="EE"><h3 align=center><b><u>ELECTRICAL AND ELECTRONICS</u></b></h3></A><BR> <BR>STAFF MEMBERS &nbsp. &nbsp. &nbsp. &nbsp. : 12 <BR><BR><U>STUDENTS STRENGTH</U> <BR><BR>FIRST YEAR&nbsp. &nbsp. : 40 <BR>SECOND YEAR &nbsp. &nbsp. &nbsp. : 50 <BR>THIRD YEAR &nbsp. &nbsp. &nbsp. : 90 <BR>SECOND YEAR &nbsp. : 60 <BR>SECOND YEAR &nbsp. &nbsp.

: 60 <BR><BR><BR><BR> <a href="#home"><Center>CLICK HERE TO HOME<Center></A> <br><br><br><br><br><br><br><br><br><br><br><br> </body> </html> OUTPUT: Z:\>college.<BR>SECOND YEAR &nbsp. &nbsp. : 55 <BR>FOURTH YEAR &nbsp. : 50 <BR>THIRD YEAR &nbsp.html 45 . &nbsp.

46 .

47 .

48 .

RESULT: Thus the program has been executed successfully. 49 .

50 . Create an html page to load the India map. 4. 5. ALGORITHM : 1.EX. Create four hot spots using coordinates in four major cities. 2. Give area link to those four major cities. If any area is clicked then that area information should be shown. 3.NO: 14 DATE: 13-09-07 AREA LINK AIM: To write a program in HTML to demonstrate the use of AREA LINK concept. From this page give link to home page.

HTML" SHAPE="RECT" COORDS="120.BMP" USEMAP="#MAP" WIDTH="371" HEIGHT="408"></P> </BODY> </HTML> DELHI.PROGRAM: INDIA.HTML">CLICK HERE TO HOME PAGE </H3> </BODY> </HTML> 51 .125.HTML" SHAPE="RECT" COORDS="149.HTML" SHAPE="RECT" COORDS="71.HTML: <HTML> <HEAD> <TITLE>INFORMATION</TITLE> </HEAD> <BODY> <P><map NAME="MAP"> <AREA HREF="FILE:Z:/sem7web/MAPS/DELHI.77.189.313.195"> <AREA HREF="FILE:Z:/sem7web/MAPS/MUMBAI.320"> <IMG BORDER="0" SRC="FILE:Z:/sem7web/MAPS/MAP4.113.HTML" SHAPE="RECT" COORDS="249.117"> <AREA HREF="FILE:Z:/sem7web/MAPS/KOLKATTA.256.157.233.240"> <AREA HREF="FILE:Z:/sem7web/MAPS/CHENNAI.HTML: <HTML> <HEAD> <TITLE>NEW DELHI</TITLE> </HEAD> <BODY> <H1>NEW DELHI</H1> <H3><PRE>NEW DELHI IS THE CAPITAL OF INDIA PARLIMENT HOUSE IS SITUATED HERE NEW DELHI NEW DELHI NEW DELHI </PRE> <A HREF="FILE:Z:/sem7web/MAPS/INDIA.

HTML">CLICK HERE TO HOME PAGE </H3> </BODY> </HTML> MUMBAI.KOLKATTA.HTML" link="blue" alink="red" vlink="cyan">CLICK HERE TO HOME PAGE </H3> </BODY> </HTML> 52 .HTML: <HTML> <HEAD> <TITLE>CHENNAI</TITLE> </HEAD> <BODY> <H1>MUMBAI</H1> <H3><PRE>MUMBAI IS THE IMPORTANT CITY MUMBAI MUMBAI MUMBAI </PRE> <A HREF="FILE:Z:/sem7web/MAPS/INDIA.HTML: <HTML> <HEAD> <TITLE>KOLKATTA</TITLE> </HEAD> <BODY> <H1>KOLKATTA</H1> <H3><PRE>KOLKATTA IS THE IMPORTANT CITY KOLKATTA KOLKATTA KOLKATTA </PRE> <A HREF="FILE:Z:/sem7web/MAPS/INDIA.

HTML">CLICK HERE TO HOME PAGE </H3> </BODY> </HTML> 53 .CHENNAI.HTML: <HTML> <HEAD> <TITLE>CHENNAI</TITLE> </HEAD> <BODY> <H1>CHENNAI</H1> <H3><PRE>CHENNAI IS THE IMPORTANT CITY CHENNAI CHENNAI CHENNAI </PRE> <A HREF="FILE:Z:/sem7web/MAPS/INDIA.

OUTPUT: 54 .

55 .

RESULT: Thus the program has been executed successfully. 56 .

The web page is displayed in a browser. For an Embedded style sheet the text is formatted by importing the format specified in style tag. For an Inline style sheet the text is formatted by using the style specified in each and every tag. Design a web page containing college information.EX. 4. 2. PROGRAM: 57 . For an linked style sheet the text is formatted by importing the format specified in different file. ALGORITHM: 1.NO: 15 DATE: CASCADING STYLE SHEET AIM: To create a webpage using Casecading stylesheet embedded and inline style sheet. 3. 5.

margin-left:1 in.5in. font-family:verdana. text-align:center. font-family:arial. margin-right:1.30 pm.css" type="text/css"></link> </head> <body> Hi there!<p><br>SRI RAM college has seperate labs for each department and all labs are available to the students till 8.the college also encourages the students to excel in extra curicular activities and other cultural activities. } </style> </head> <body> <p>Hi!Hello<br>SRI RAM Engg College.CSS Body { font-size:12pt.The college has a good infrastructure and campus </p> <h1>THIS IS H1</h1> </body> </html> EXTERNAL <html> <head> <link rel="stylesheet" href="mystyle. } H1 { font-size:16pt. color:green. </p> </body> </html> MYSTYLE. 58 .EMBEDDED <html> <head> <title>stylesheet</title> </head> <style> body { background:white.

} </style> </head> <body> <p class ="tech">Hi this is class style sheet<br> This is SRI RAM engineering college </p> </body> </html> OUTPUT: 59 . background:white.tech { font-weight:bold. color:blue. } INLINE <html> <head> <style> . color:blue. font-family:verdana. } p { font-size:10pt. margin-right:50px.color:brown. margin-left:50px.5in. text-indent:0.

The college has a good infrastructure and campus THIS IS H1 EXTERNAL OUTPUT: Hi there! SRI RAM college has seperate labs for each department and all labs are available to the students till 8.30 pm.EMBEDDED OUTPUT: Hi!Hello SRI RAM Engg College.the college also encourages the students to excel in extra curicular activities and other cultural activities. 60 . INLINE OUTPUT: Hi this is class style sheet This is SRI RAM engineering college RESULT: Thus the program has been executed successfully.

Sign up to vote on this title
UsefulNot useful