Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Program 1:

Develop and demonstrate a XHTML document that illustrates the use external style sheet, ordered list, table, borders, padding, color, and the <span> tag. Program: lab1.html <html> <head> <title>First Lab Manual Program</title> </head> <body> <h1>About Web Programming <ol> <li>Case Sensitive</li> <li>Similar to html 4.01</li> <li>All tags should be closed</li> </ol> <table border="3" bgcolor="#CCCCC" cellpadding="30"> <tr> <th> USN </th> <th> NAME</th> <th> DEPT </th> </tr> <tr class="backcolor"> <td> 08EMEIT001 </td> <td> Student</td> <td> B. Tech </td> </tr> <tr class="backcolor"> <td> 08EMEIT001 </td> <td> Student2</td> <td> B. Tech </td> </tr> </table> <style type="text/css">.A{font-size:24pt;font-family:ariel;color:red} </style> <p> This is student<span class="A"> marks </span> information </p> </body> </html>

Program 2:
Develop and demonstrate a XHTML file that includes JavaScript script for the following problems: a. Input: A number n obtained using prompt b. Output: The first n Fibonacci numbers Program: 2(a).html <html> <head> <title> Second program </title> <SCRIPT LANGUAGE="JAVASCRIPT"> var f0=0,f1=1,fn=0,i=1; n=prompt("Enter the number of terms u want",0); document.write("The first " + n + " fibonacci series are "); while(i<=n) { document.write(f0 + " "); fn=f0+f1; f0=f1 f1=fn; i++; } </SCRIPT> </head> </html>

Output

2b. Input: A number n obtained using prompt


Output: A table of numbers from 1 to n and their squares using alert Program2(b).html <html> <head> <title>Program 2b</title> <body> <script language="javascript"> <!-varn,i,j,p,k=1,s; n=prompt("Enter the value"," "); document.writeln("value of n = "+n); document.writeln("<br/>"); for(i=1;i<=n;i++) { for(j=1;j<=10;j++) { p=k*j; document.writeln(p+" ,"); } k++; document.writeln("<br/>"); } alert("THEIR SQUARE IS "); document.writeln("<br/></br>"); k=1; document.writeln("Their squares are"); document.writeln("</br></br>"); for(i=1;i<=n;i++) { for(j=1;j<=10;j++) { p=k*j; s=p*p; document.writeln(s+" ,"); } k++; document.writeln("<br/>"); } document.close(); //--> </script></body></html>

You might also like