MCA lab-8 questions with answers BY GOPINATH










INDEX





1. Write a HTML program to demonstrate HTML Headers.





2. Write a HTML program using images as link Anchor.





3. Write a HTML program for adding images with HTML.





4. Write a HTML program formatting text size and color.





5. Write a HTML program to explain Nested unordered listed.





6. Write a HTML program to demonstrate different types of ordered lists.





7. Write a HTML program to demonstrate tables with formatting and colors.





8. Write a HTML program using FRAMESET Tag to first divide the web page into two columns, and right column bottom row having the main page with text. The left host column with some other images.





9. Write a HTML program using Java script to analyses examination result of a class of 10 students. If no. of students passed in that class in greater than no. of students failed then display the text 'Good Result'.





10. Write a HTML program using Java script to demonstrate (a) Alert Box (b) Prompt dialogue





11. Write a HTML program using Java script to perform comparison between two numbers entered by user, using relational operators.





12. Write a HTML program using Java script to calculate the product of 3 integers.





13. Write a HTML program using J/s to pay the factorial of integer using recursions.





14. W Write a HTML program using J / s to demonstrate Fibonacci (series) numbers using recursion.



15. Write a HTML program using J / s to product sum of even integers from 2 to 100.





16. Write a HTML program using Java script to search an array of elements using linear search.





17. Write a HTML program using Java script to search an element in an array element using binary search.





18. Write a HTML program using J / s to demonstrate Date and Time methods.





19. Write a HTML program to demonstrate aligning text and setting box dimensions using CSS.





20. Write a HTML program to demonstrate object hierarchy using collection children.





21. Write a HTML program to demonstrate ONCLICK and ONLOAD.





22. Write a HTML program to demonstrate error handling with ONERROR.





23. Write a HTML program to demonstrate MOUSE EVENTS.





24. Write a HTML program to demonstrate Flip Filter.





25. Write a HTML program to demonstrate shadow filter.





26. Write a HTML program using VB script, to find minimum of 3 numbers.





27. Write a HTML program using VB script, to demonstrate various string functions.





28. Write a HTML program using VB script to find sum of two numbers.





29. Write a HTML program using VB script to demonstrate use of VB script classes.





30. Write a HTML program to demonstrate the forms, by reading the name of the user from the form.























1. Write a HTML program to demonstrate HTML Headers.







Code:


























Level 1 Header






Level 2 Header






Level 3 Header






Level 4 Header






Level 5 Header





Level 6 Header
































Output:





Level 1 Header



Level 2 Header



Level 3 Header



Level 4 Header



Level 5 Header



Level 6 Header







2. Write a HTML program using images as link Anchor.





Code:

























Img2











this is linking img

















Output:



Img2 this is linking img







3. Write a HTML program for adding images with HTML.



Code:






























Work with image



























Output:



Work with image



4. Write a HTML program formatting text size and color.



Code:













display in bold

display in italic

display in monospace teletype foot style

display in big

display in small

the chemical h2so4is sulpric acid.



the value of 25is32





















Output:





display in bold

display in italic

display in monospace teletype foot style

display in big

display in small

the chemical h2so4is sulpric acid.

the value of 25is32









5. Write a HTML program to explain Nested unordered listed.



Code:














    madina inst com science
  • global colg


  • mba schol




      in global
    • mba


    • b.tech


    • mca




        in b.tech
      • e.e.e


      • cs


      • e.c.e


























Output:





madina inst com science



global colg

mba schol

in global



mba

b.tech

mca

in b.tech



e.e.e

cs

e.c.e





6. Write a HTML program to demonstrate different types of ordered lists.





Code:











numbered order list





  1. daa
  2. cn
  3. wp
    1. se
    2. ds
    3. roman letters

      1. dbms
      2. dc
      3. fail
      4. Output: numbered order list daa cn wp se ds roman letters dbms dc fail 7. Write a HTML program to demonstrate tables with formatting and colors. Code: <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><>
        monthsalary
        monthsalary
        monthsalary
        Output: month salary month salary month salary 8. Write a HTML program using FRAMESET Tag to first divide the web page into two columns, and right column bottom row having the main page with text . The left host column with some other images. Code: 9. Write a HTML program using Java script to analyse examination result of a class of 10 students. If no. of students passed in that class in greater than no. of students failed then display the text 'Good Result'. Code: 10. Write a HTML program using Java script to demonstrate (a) Alert Box(b) Prompt dialogue Code for Alert box: Code for Prompt dialogue: 12. Write a HTML program using Java script to calculate the product of 3 integers. Code: Output: The product is 6 13. Write a HTML program using J/s to pay the factorial of integer using recursions. Code: Output: Factorials of 1 to 10 0! 1 1! 1 2! 2 3! 6 4! 24 5! 120 6! 720 7! 5040 8! 40320 9! 362880 10! 3628800 14. W Write a HTML program using J / s to demonstrate Fibonacci (series) numbers using recursion. Code: 16. Write a HTML program using Java script to search an array of elements using linear search. Code:
        Enter integer search key Result Output: 1 Enter integer search key Result Output: 2 Enter integer search key Result 17. Write a HTML program using Java script to search an element in an array element using binary search. Code:
        Enter integer search key "Search" onclick = "buttonPressed()" /> Result Output: 1 Enter integer search key Result Output: 2 Enter integer search key Result 18. Write a HTML program using J / s to demonstrate Date and Time methods. Code: Output: String representations and valueOf toString: Sun Jun 13 18:39:34 UTC+0530 2010 toLocaleString: Sunday, June 13, 2010 6:39:34 PM toUTCString: Sun, 13 Jun 2010 13:09:34 UTC valueOf: 1276434574125 Get methods for local time zone getDate: 13 getDay: 0 getMonth: 5 getFullYear: 2010 getTime: 1276434574125 getHours: 18 getMinutes: 39 getSeconds: 34 getMilliseconds: 125 getTimezoneOffset: -330 Specifying arguments for a new Date Date: Sun Mar 18 01:05:00 UTC+0530 2001 Set methods for local time zone Modified date: Mon Dec 31 23:59:59 UTC+0530 2001 19. Write a HTML program to demonstrate aligning text and setting box dimensions using CSS. Code: st.css file h1 { color="green";}

        Css program

        Output: st.css file h1 { color="green";} Css program 20. Write a HTML program to demonstrate object hierarchy using collection children. Code:

        this is to count the number of tags in the program

        Output: this is to count the number of tags in the program HTML HEAD TITLE META META META META SCRIPT BODY H1 21. Write a HTML program to demonstrate ONCLICK and ONLOAD. 1:Code for onClick:
        Click on this text!
        Output: Click on this text! 2:Code for onLoad: Seconds you have spent viewing this page so far:0 Output: Seconds you have spent viewing this page so far: 23 22. Write a HTML program to demonstrate error handling with ONERROR. Code: Output: Error: Object expected on line 8 23. Write a HTML program to demonstrate MOUSE EVENTS. Code for onMouseover: (0, 0) Butterfly Output: BODY (379, 514) Code for onMouseout:

        Guess the Hex Code's Actual Color

        Can you tell a color from its hexadecimal RGB code value? Look at the hex code, guess the color. To see what color it corresponds to, move the mouse over the hex code. Moving the mouse out will display the color name. <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><>
        alt = "Table Caption" />
        #000000#0000FF#FF00FF#808080
        #008000#00FF00#800000
        #808000#800080#FF0000#C0C0C0
        #00FFFF#008080#FFFF00#FFFFFF
        Output: Guess the Hex Code's Actual Color Can you tell a color from its hexadecimal RGB code value? Look at the hex code, guess the color. To see what color it corresponds to, move the mouse over the hex code. Moving the mouse out will display the color name. #000000 #0000FF Magenta Gray Green #00FF00 Maroon Navy Olive #800080 Red Silver Cyan #008080 Yellow White 24. Write a HTML program to demonstrate Flip Filter. Code: <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><> <><><>
        TextText
        TextText
        Output: Text Text Text Text 25. Write a HTML program to demonstrate shadow filter. Code:

        Shadow Direction: 0

        Output: Shadow Direction: 270 26. Write a HTML program using VB script, to find minimum of 3 numbers. Code:
        Enter a number
        value = "0" /> Enter a number value = "0" /> Enter a number value = "0" /> value = "Enter" /> Output: Enter a number Enter a number Enter a number Click here 27. Write a HTML program using VB script, to demonstrate various string functions. Code: Output: !enoyrevE olleHHelloBillGates Hello BillGates HelloBill Gates HAVE A NICE DAY! have a nice day!Welco ite!!Welcome to this Page!!to 28. Write a HTML program using VB script to find sum of two numbers. Code: Click the button to add an integer to the total.
        value = "Click Here to Add to the Total"> Output: Click the button to add an integer to the total. 29. Write a HTML program using VB script to demonstrate use of VB script classes. Code:
        Enter first name
        Enter age Enter social security number value = "Enter" /> Output: Enter first name Enter age Enter social security number 30. Write a HTML program to demonstrate the forms, by reading the name of the user from the form. Code:
        Name: E-mail Address: How would you rate our site? Comments? Would you like to be on our mailing list? Don't Care Ouput: Name: E-mail Address: How would you rate our site? Comments? Would you like to be on our mailing list? Yes No Don't Care